1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  5. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  6. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  7. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  8. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  9. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  10. 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.

Arcane Drain V1.02

Submitted by Tank-Commander
This bundle is marked as approved. It works and satisfies the submission rules.
Played around with the idea of "how configurable can you make a relatively simple spell" the result being this, Arcane Drain, not much to say about it other than being relatively sfx-spammy (I reduced it a lot though) but it's a fun spell

Features

- More configurable than anybody would care to use
- Documentation
- Fun to play around with
- Comes with 3 "default" themes (can be added/modified at will ofc)
- Draining spell (who doesn't like them?)
- Import instructions


Tooltip

Disperses draining fields randomly in the general direction of the target area, draining fields will absorb life and mana from the target and return the health and mana to the caster. The form the spell takes depends on its level.

Level 1 - Drains 25 health and 12 mana per second.
Level 2 - Drains 30 health and 15 mana per second.
Level 3 - Drains 35 health and 17 mana per second,


Conditions(x)

Each configuration variable controls which features you want to use in your spells

[0] - True: Have starting projectile/False: Instantly create draining areas
[1] - True: Drain Health/False: Don't drain health
[2] - True: Have projectiles "deliver" health to caster/False: Health immediately given to caster
[3] - True: Drain Mana/False: Don't drain mana
[4] - True: Have projectiles "deliver" mana to caster/False: Mana immediately given to caster
[5] - True: Uses "True" projectile speed (fixed value)/False: Projectile speed dependent on distance (all will land at the same time)
[6] - True: Changes "theme" of spell upon levelup/False: uses "Default" theme (set directly below)

-------------------
There are conditions which effect unit targetting, they are explained straightforwardly in the config
[7]
[8]
[9]
[10]
[11]
--------------------

[12] - True: Will drain all mana from target until the hit 0/False: Will drain amount of mana only when the total amount is available (i.e. mana must at least equal normal drain amount)
[13] - True: Shows Healing SFX/False: Does not show Healing SFX
[14] - True: Shows Mana SFX/False: Does not show Mana SFX
[15] - True: Shows Mana being drained SFX/False: Does not show Mana being drained SFX
[16] - True: Shows Health being drained SFX/False: Does not show Health being drained SFX
[17] - True: Will pick a random theme (overrides other theme options)


Triggers

  • Arcane Drain Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- -------- --------
      • -------- Determines the Parts of the spell used --------
      • -------- Launch Projectile --------
      • Set AD_Conditions[0] = True
      • -------- Drain Health --------
      • Set AD_Conditions[1] = True
      • -------- Drain Health Projectile --------
      • Set AD_Conditions[2] = True
      • -------- Drain Mana --------
      • Set AD_Conditions[3] = True
      • -------- Drain Mana Projectile --------
      • Set AD_Conditions[4] = True
      • -------- ProjectileSpeed/Incoming Time --------
      • Set AD_Conditions[5] = False
      • -------- Cycle Themes --------
      • Set AD_Conditions[6] = False
      • -------- If cycle themes is set to False, this determines which Theme will be used --------
      • Set AD_DefaultTheme = 1
      • Set AD_SpellsThemeCount = 3
      • -------- Determines the targets available for the spell --------
      • -------- Target is alive --------
      • Set AD_Conditions[7] = True
      • -------- Target is Magic Immune --------
      • Set AD_Conditions[8] = False
      • -------- Target is Structure --------
      • Set AD_Conditions[9] = False
      • -------- Target is Ground unit --------
      • Set AD_Conditions[10] = True
      • -------- Target is Belongs to an enemy --------
      • Set AD_Conditions[11] = True
      • -------- Full Mana Drain --------
      • Set AD_Conditions[12] = True
      • -------- Other conditions --------
      • -------- Healing SFX --------
      • Set AD_Conditions[13] = True
      • -------- Mana SFX --------
      • Set AD_Conditions[14] = True
      • -------- Drain Mana SFX --------
      • Set AD_Conditions[15] = True
      • -------- Drain Health SFX --------
      • Set AD_Conditions[16] = True
      • -------- Randomise Theme --------
      • Set AD_Conditions[17] = True
      • -------- Controls amount of SFX --------
      • Set AD_SFXWaitTime = 15.00
      • -------- Controls the minimum spread out distance of the drain areas --------
      • Set AD_MinDistanceSpread = 90.00
      • Set AD_RecieveSFXLimiter = 3
      • -------- Determines the Projectile Movement --------
      • -------- Launch Projectile --------
      • Set AD_LaunchArcMultiplyerBase = 0.30
      • Set AD_LaunchArcMultiplyerPL = 0.00
      • Set AD_LaunchSpeedBase = 4.00
      • Set AD_LaunchSpeedPerLevel = 1.00
      • Set AD_LaunchIncomingTimeBase = 2.50
      • Set AD_LaunchIncomingTimePerLevel = -0.50
      • -------- Heal Projectile --------
      • Set AD_HealthArcMultiplyerBase = 0.45
      • Set AD_HealthArcMultiplyerPL = 0.00
      • Set AD_HealSpeedBase = 5.00
      • Set AD_HealSpeedPerLevel = 0.00
      • Set AD_HealthIncomingTimeBase = 2.00
      • Set AD_HealthIncomingTimePerLevel = -0.25
      • -------- Mana Projectile --------
      • Set AD_ManaArcMultiplyerBase = 0.50
      • Set AD_ManaArcMultiplyerPL = 0.00
      • Set AD_ManaSpeedBase = 5.00
      • Set AD_ManaSpeedPerLevel = 0.00
      • Set AD_ManaIncomingTimeBase = 2.00
      • Set AD_ManaIncomingTimePerLevel = -0.25
      • -------- Determines the area that the Drain Areas will scatter across --------
      • Set AD_AoeBase = 200.00
      • Set AD_AoePerLevel = 50.00
      • -------- Determines how much space each Drain Area covers --------
      • Set AD_DrainAreaAOEBase = 120.00
      • Set AD_DrainAreaAOEPerLevel = 0.00
      • -------- Determines the amount of Drain areas created --------
      • Set AD_DrainAreaCountBase = 4
      • Set AD_DrainAreaCountPerLevel = 2
      • -------- Determines how much Health damage a unit takes per second --------
      • Set AD_HealthDamagePerSecBase = 20.00
      • Set AD_HealthDamagePerSecPerLevel = 5.00
      • -------- Determines how much Mana damage a unit takes per second --------
      • Set AD_ManaDamagePerSecBase = 10.00
      • Set AD_ManaDamagePerSecPerLevel = 2.50
      • -------- Determines how long the drain area will last (seconds) --------
      • -------- When changing this, remember to modify the object data spell and increase the "follow through time" to these values +2 or 3 seconds (depending on method of movement) --------
      • -------- Otherwise the spell will end early --------
      • Set AD_DrainAreaDurationBase = 2.00
      • Set AD_DrainAreaDurationPerLevel = 3.00
      • -------- Determines the scaling of the SFX --------
      • -------- Determines the scaling of the Launch Projectiles --------
      • Set AD_EffectScalingLaunchBase = 100.00
      • Set AD_EffectScalingLaunchPL = 0.00
      • -------- Determines the scaling of the Drain Areas --------
      • Set AD_EffectScalingDrainAreaBase = 80.00
      • Set AD_EffectScalingDrainAreaPL = 0.00
      • -------- Determines the scaling of the Drained Health Projectiles --------
      • Set AD_EffectScalingHealthBase = 50.00
      • Set AD_EffectScalingHealthPL = 0.00
      • -------- Determines the scaling of the Drained Mana Projectiles --------
      • Set AD_EffectScalingManaBase = 50.00
      • Set AD_EffectScalingManaPL = 0.00
      • -------- Determines the unit model used as the Drain Area --------
      • Set AD_DrainAreaSFX[1] = Abilities\Spells\Other\Drain\ManaDrainTarget.mdl
      • Set AD_DrainAreaSFX[2] = Abilities\Spells\Orc\LiquidFire\Liquidfire.mdl
      • Set AD_DrainAreaSFX[3] = Abilities\Spells\NightElf\EntanglingRoots\EntanglingRootsTarget.mdl
      • -------- Determines the SFX used as the Launch Projectile --------
      • Set AD_LaunchSFX[1] = Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
      • Set AD_LaunchSFX[2] = Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
      • Set AD_LaunchSFX[3] = Abilities\Weapons\GreenDragonMissile\GreenDragonMissile.mdl
      • -------- Determines the SFX used as the Drained Health Projectile --------
      • Set AD_HealthDrainSFX[1] = Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
      • Set AD_HealthDrainSFX[2] = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • Set AD_HealthDrainSFX[3] = Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • -------- Determines the unit model used as the Drained Mana Projectile --------
      • Set AD_ManaDrainSFX[1] = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • Set AD_ManaDrainSFX[2] = Abilities\Weapons\LavaSpawnMissile\LavaSpawnMissile.mdl
      • Set AD_ManaDrainSFX[3] = Units\Human\HeroBloodElf\BloodElfBall.mdl
      • -------- Determines the unit model used as the Healing effect --------
      • Set AD_HealedLifeSFX[1] = Abilities\Spells\Items\ResourceItems\ResourceEffectTarget.mdl
      • Set AD_HealedLifeSFX[2] = Abilities\Spells\Orc\FeralSpirit\feralspirittarget.mdl
      • Set AD_HealedLifeSFX[3] = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
      • -------- Determines the unit model used as the Healing effect for mana --------
      • Set AD_HealedManaSFX[1] = Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
      • Set AD_HealedManaSFX[2] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Set AD_HealedManaSFX[3] = Abilities\Spells\Undead\Sleep\SleepSpecialArt.mdl
      • -------- Determines the unit model used as the Drained effect --------
      • Set AD_DrainedHealthSFX[1] = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Set AD_DrainedHealthSFX[2] = Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
      • Set AD_DrainedHealthSFX[3] = Abilities\Spells\NightElf\Immolation\ImmolationDamage.mdl
      • -------- Determines the unit model used as the Drained effect for mana --------
      • Set AD_DrainedManaSFX[1] = Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
      • Set AD_DrainedManaSFX[2] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Set AD_DrainedManaSFX[3] = Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
      • -------- Determines the unit model used as the effect for ending the spell --------
      • Set AD_EndSFX[1] = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
      • Set AD_EndSFX[2] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Set AD_EndSFX[3] = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • -------- Determines the unit model use when the effect is cancelled early --------
      • Set AD_CancelledSFX[1] = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
      • Set AD_CancelledSFX[2] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Set AD_CancelledSFX[3] = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • -------- Determines the ability used as a dummy --------
      • Set AD_Spell = Arcane Drain
      • -------- Determines the order used to check that the spell is being cast (should match ability used) --------
      • Set AD_Order = channel
      • -------- Determines the Dummy used to attach all the effects to --------
      • Set AD_DummyType = Arcane Drain
      • -------- -------- --------
      • -------- Determines the Speed of the loop trigger --------
      • Set AD_TimerSpeed = 0.03
      • Trigger - Add to Arcane Drain Loop <gen> the event (Time - Every AD_TimerSpeed seconds of game time)
      • -------- -------- --------

  • Arcane Drain Activation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to AD_Spell
    • Actions
      • Set AD_TempUnit2 = (Triggering unit)
      • Set AD_TempPlayer = (Owner of AD_TempUnit2)
      • Set AD_TempInteger2 = (Level of AD_Spell for AD_TempUnit2)
      • Set AD_TempReal = (Real(AD_TempInteger2))
      • Set AD_TempInteger = (AD_DrainAreaCountBase + (AD_DrainAreaCountPerLevel x (Integer(AD_TempReal))))
      • Set AD_TempPoint2 = (Target point of ability being cast)
      • -------- Identifies if you want the theme to change upon level up, randomly, or not at all --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AD_Conditions[17] Equal to True
        • Then - Actions
          • Set AD_TempInteger2 = (Random integer number between 1 and AD_SpellsThemeCount)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AD_Conditions[6] Equal to False
            • Then - Actions
              • Set AD_TempInteger2 = AD_DefaultTheme
            • Else - Actions
      • -------- Runs depending on if you want starting projectiles --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AD_Conditions[0] Equal to True
        • Then - Actions
          • -------- Projectile Launch --------
          • Set AD_TempPoint = (Position of AD_TempUnit2)
          • For each (Integer AD_Index) from 1 to AD_TempInteger, do (Actions)
            • Loop - Actions
              • Set AD_MaxIndex = (AD_MaxIndex + 1)
              • Set AD_TempPoint3 = (AD_TempPoint2 offset by (Random real number between AD_MinDistanceSpread and (AD_AoeBase + (AD_AoePerLevel x AD_TempReal))) towards (Random angle) degrees)
              • Unit - Create 1 AD_DummyType for AD_TempPlayer at AD_TempPoint facing (Angle from AD_TempPoint to AD_TempPoint3) degrees
              • Set AD_TempUnit = (Last created unit)
              • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_LaunchSFX[AD_TempInteger2]
              • Animation - Change AD_TempUnit's size to ((AD_EffectScalingLaunchBase + (AD_EffectScalingLaunchPL x AD_TempReal))%, 0.00%, 0.00%) of its original size
              • Set AD_OriginalCaster[AD_MaxIndex] = AD_TempUnit2
              • Set AD_SpecialEffect[AD_MaxIndex] = (Last created special effect)
              • Set AD_DrainAOE[AD_MaxIndex] = (AD_DrainAreaAOEBase + (AD_DrainAreaAOEPerLevel x AD_TempReal))
              • Set AD_HealthDrain[AD_MaxIndex] = (((AD_HealthDamagePerSecBase + (AD_HealthDamagePerSecPerLevel x AD_TempReal)) x AD_TimerSpeed) x AD_SFXWaitTime)
              • Set AD_ManaDrain[AD_MaxIndex] = (((AD_ManaDamagePerSecBase + (AD_ManaDamagePerSecPerLevel x AD_TempReal)) x AD_TimerSpeed) x AD_SFXWaitTime)
              • Set AD_Duration[AD_MaxIndex] = (AD_DrainAreaDurationBase + (AD_DrainAreaDurationPerLevel x AD_TempReal))
              • Set AD_AbilityLevel[AD_MaxIndex] = AD_TempReal
              • Set AD_CurrentDistance[AD_MaxIndex] = 0.00
              • Set AD_Theme[AD_MaxIndex] = AD_TempInteger2
              • Custom script: set udg_AD_CasterX[udg_AD_MaxIndex] = GetUnitX(udg_AD_TempUnit2)
              • Custom script: set udg_AD_CasterY[udg_AD_MaxIndex] = GetUnitY(udg_AD_TempUnit2)
              • Set AD_MaxDistance[AD_MaxIndex] = (Distance between AD_TempPoint and AD_TempPoint3)
              • Set AD_MaxHeight[AD_MaxIndex] = (AD_MaxDistance[AD_MaxIndex] x (AD_LaunchArcMultiplyerBase + (AD_LaunchArcMultiplyerPL x AD_TempReal)))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AD_Conditions[5] Equal to True
                • Then - Actions
                  • Set AD_LaunchSpeed[AD_MaxIndex] = (AD_LaunchSpeedBase + (AD_LaunchSpeedPerLevel x AD_TempReal))
                • Else - Actions
                  • Set AD_LaunchSpeed[AD_MaxIndex] = ((AD_MaxDistance[AD_MaxIndex] x 0.03) / (AD_LaunchIncomingTimeBase + (AD_LaunchIncomingTimePerLevel x AD_TempReal)))
              • Set AD_UnitIndex[AD_MaxIndex] = AD_TempUnit
              • Set AD_StageID[AD_MaxIndex] = 1
              • Custom script: call RemoveLocation (udg_AD_TempPoint3)
              • Custom script: set udg_AD_TempPoint3 = null
          • Custom script: call RemoveLocation (udg_AD_TempPoint)
          • Custom script: set udg_AD_TempPoint = null
        • Else - Actions
          • -------- Instant Draining area creation --------
          • For each (Integer AD_Index) from 1 to AD_TempInteger, do (Actions)
            • Loop - Actions
              • Set AD_MaxIndex = (AD_MaxIndex + 1)
              • Set AD_TempPoint3 = (AD_TempPoint2 offset by (AD_AoeBase + (AD_AoePerLevel x AD_TempReal)) towards (Random angle) degrees)
              • Unit - Create 1 AD_DummyType for AD_TempPlayer at AD_TempPoint3 facing (Angle from AD_TempPoint2 to AD_TempPoint3) degrees
              • Set AD_TempUnit = (Last created unit)
              • Unit - Add a (AD_DrainAreaDurationBase + (AD_DrainAreaDurationPerLevel x AD_TempReal)) second Generic expiration timer to AD_TempUnit
              • Unit - Pause AD_TempUnit
              • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_DrainAreaSFX[AD_TempInteger2]
              • Animation - Change AD_TempUnit's size to ((AD_EffectScalingDrainAreaBase + (AD_EffectScalingDrainAreaPL x AD_TempReal))%, 0.00%, 0.00%) of its original size
              • Set AD_OriginalCaster[AD_MaxIndex] = AD_TempUnit2
              • Set AD_SpecialEffect[AD_MaxIndex] = (Last created special effect)
              • Set AD_DrainAOE[AD_MaxIndex] = (AD_DrainAreaAOEBase + (AD_DrainAreaAOEPerLevel x AD_TempReal))
              • Set AD_AbilityLevel[AD_MaxIndex] = AD_TempReal
              • Set AD_HealthDrain[AD_MaxIndex] = (((AD_HealthDamagePerSecBase + (AD_HealthDamagePerSecPerLevel x AD_TempReal)) x AD_TimerSpeed) x AD_SFXWaitTime)
              • Set AD_ManaDrain[AD_MaxIndex] = (((AD_ManaDamagePerSecBase + (AD_ManaDamagePerSecPerLevel x AD_TempReal)) x AD_TimerSpeed) x AD_SFXWaitTime)
              • Set AD_UnitIndex[AD_MaxIndex] = AD_TempUnit
              • Set AD_Theme[AD_MaxIndex] = AD_TempInteger2
              • Set AD_StageID[AD_MaxIndex] = 2
              • Custom script: call RemoveLocation (udg_AD_TempPoint3)
              • Custom script: set udg_AD_TempPoint3 = null
      • Custom script: call RemoveLocation (udg_AD_TempPoint2)
      • Custom script: set udg_AD_TempPoint2 = null
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Arcane Drain Loop <gen> is on) Equal to False
          • AD_MaxIndex Greater than or equal to 1
        • Then - Actions
          • Trigger - Turn on Arcane Drain Loop <gen>
          • Trigger - Turn on Arcane Drain Dummy Removal <gen>
        • Else - Actions

  • Arcane Drain Loop
    • Events
    • Conditions
    • Actions
      • For each (Integer AD_Index) from 1 to AD_MaxIndex, do (Actions)
        • Loop - Actions
          • -------- Initial projectile control --------
          • Set AD_TempUnit = AD_UnitIndex[AD_Index]
          • Custom script: set udg_AD_TempX = GetUnitX(udg_AD_OriginalCaster[udg_AD_Index])
          • Custom script: set udg_AD_TempY = GetUnitY(udg_AD_OriginalCaster[udg_AD_Index])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Current order of AD_OriginalCaster[AD_Index]) Not equal to (Order(AD_Order))
                  • AD_CasterX[AD_Index] Not equal to AD_TempX
                  • AD_CasterY[AD_Index] Not equal to AD_TempY
            • Then - Actions
              • Special Effect - Destroy AD_SpecialEffect[AD_Index]
              • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_CancelledSFX[AD_Theme[AD_Index]]
              • Special Effect - Destroy (Last created special effect)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AD_StageID[AD_Index] Equal to 2
                • Then - Actions
                  • Unit - Kill AD_TempUnit
                • Else - Actions
                  • Set AD_StageID[AD_Index] = 5
            • Else - Actions
          • Custom script: set udg_AD_CasterX[udg_AD_Index] = udg_AD_TempX
          • Custom script: set udg_AD_CasterY[udg_AD_Index] = udg_AD_TempY
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AD_StageID[AD_Index] Equal to 1
            • Then - Actions
              • Custom script: set udg_AD_TempX = GetUnitX(udg_AD_TempUnit)
              • Custom script: set udg_AD_TempY = GetUnitY(udg_AD_TempUnit)
              • Custom script: set udg_AD_Angle = GetUnitFacing(udg_AD_TempUnit) * bj_DEGTORAD
              • Custom script: call SetUnitX(udg_AD_TempUnit, udg_AD_TempX + udg_AD_LaunchSpeed[udg_AD_Index] * Cos(udg_AD_Angle))
              • Custom script: call SetUnitY(udg_AD_TempUnit, udg_AD_TempY + udg_AD_LaunchSpeed[udg_AD_Index] * Sin(udg_AD_Angle))
              • Set AD_CurrentDistance[AD_Index] = (AD_CurrentDistance[AD_Index] + AD_LaunchSpeed[AD_Index])
              • Animation - Change AD_TempUnit flying height to ((((4.00 x AD_MaxHeight[AD_Index]) / AD_MaxDistance[AD_Index]) x (AD_CurrentDistance[AD_Index] / AD_MaxDistance[AD_Index])) x (AD_MaxDistance[AD_Index] - AD_CurrentDistance[AD_Index])) at 0.00
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AD_CurrentDistance[AD_Index] Greater than or equal to AD_MaxDistance[AD_Index]
                • Then - Actions
                  • Special Effect - Destroy AD_SpecialEffect[AD_Index]
                  • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_DrainAreaSFX[AD_Theme[AD_Index]]
                  • Set AD_SpecialEffect[AD_Index] = (Last created special effect)
                  • Animation - Change AD_TempUnit's size to ((AD_EffectScalingDrainAreaBase + (AD_EffectScalingDrainAreaPL x AD_TempReal))%, 0.00%, 0.00%) of its original size
                  • Unit - Add a AD_Duration[AD_Index] second Generic expiration timer to AD_TempUnit
                  • Set AD_StageID[AD_Index] = 2
                • Else - Actions
            • Else - Actions
              • -------- Draining control --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AD_StageID[AD_Index] Equal to 2
                • Then - Actions
                  • Set AD_TempPoint = (Position of AD_TempUnit)
                  • Set AD_TempGroup = (Units within AD_DrainAOE[AD_Index] of AD_TempPoint)
                  • Unit Group - Pick every unit in AD_TempGroup and do (Actions)
                    • Loop - Actions
                      • Set AD_TempUnit2 = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (AD_TempUnit2 is alive) Equal to AD_Conditions[7]
                          • (AD_TempUnit2 is Magic Immune) Equal to AD_Conditions[8]
                          • (AD_TempUnit2 is A structure) Equal to AD_Conditions[9]
                          • (AD_TempUnit2 is A ground unit) Equal to AD_Conditions[10]
                          • (AD_TempUnit2 belongs to an enemy of (Owner of AD_OriginalCaster[AD_Index])) Equal to AD_Conditions[11]
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • AD_Conditions[1] Equal to True
                            • Then - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • AD_SFXCurrentWaitTimeHpHeal[AD_Index] Greater than or equal to AD_SFXWaitTime
                                • Then - Actions
                                  • Set AD_TempReal = (Life of AD_TempUnit2)
                                  • Unit - Cause AD_OriginalCaster[AD_Index] to damage AD_TempUnit2, dealing AD_HealthDrain[AD_Index] damage of attack type Spells and damage type Normal
                                  • Set AD_TempReal2 = (Life of AD_TempUnit2)
                                  • Set AD_CarriedHealth[AD_Index] = (AD_TempReal - AD_TempReal2)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • AD_Conditions[16] Equal to True
                                    • Then - Actions
                                      • Special Effect - Create a special effect attached to the chest of AD_TempUnit2 using AD_DrainedHealthSFX[AD_Theme[AD_Index]]
                                      • Special Effect - Destroy (Last created special effect)
                                    • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • AD_Conditions[2] Equal to True
                                    • Then - Actions
                                      • -------- Health Segment creation --------
                                      • Set AD_MaxIndex = (AD_MaxIndex + 1)
                                      • Set AD_TempPoint2 = (Position of AD_OriginalCaster[AD_Index])
                                      • Unit - Create 1 AD_DummyType for AD_TempPlayer at AD_TempPoint facing (Angle from AD_TempPoint to AD_TempPoint2) degrees
                                      • Set AD_TempUnit = (Last created unit)
                                      • Set AD_TempReal = AD_AbilityLevel[AD_Index]
                                      • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_HealthDrainSFX[AD_Theme[AD_Index]]
                                      • Animation - Change AD_TempUnit's size to ((AD_EffectScalingHealthBase + (AD_EffectScalingHealthPL x AD_TempReal))%, 0.00%, 0.00%) of its original size
                                      • Set AD_OriginalCaster[AD_MaxIndex] = AD_OriginalCaster[AD_Index]
                                      • Set AD_SpecialEffect[AD_MaxIndex] = (Last created special effect)
                                      • Set AD_CarriedHealth[AD_MaxIndex] = AD_CarriedHealth[AD_Index]
                                      • Set AD_CarriedMana[AD_MaxIndex] = 0.00
                                      • Set AD_CurrentDistance[AD_MaxIndex] = 0.00
                                      • Set AD_Theme[AD_MaxIndex] = AD_TempInteger2
                                      • Set AD_MaxDistance[AD_MaxIndex] = (Distance between AD_TempPoint and AD_TempPoint2)
                                      • Set AD_MaxHeight[AD_MaxIndex] = (AD_MaxDistance[AD_MaxIndex] x (AD_HealthArcMultiplyerBase + (AD_HealthArcMultiplyerPL x AD_TempReal)))
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • AD_Conditions[5] Equal to True
                                        • Then - Actions
                                          • Set AD_HealthSpeed[AD_MaxIndex] = (AD_HealSpeedBase + (AD_HealSpeedPerLevel x AD_TempReal))
                                        • Else - Actions
                                          • Set AD_HealthSpeed[AD_MaxIndex] = ((AD_MaxDistance[AD_MaxIndex] x AD_TimerSpeed) / (AD_HealthIncomingTimeBase + (AD_HealthIncomingTimePerLevel x AD_TempReal)))
                                      • Set AD_UnitIndex[AD_MaxIndex] = AD_TempUnit
                                      • Set AD_StageID[AD_MaxIndex] = 3
                                      • Custom script: call RemoveLocation (udg_AD_TempPoint2)
                                    • Else - Actions
                                      • Set AD_SFXLimiter = (Random integer number between 1 and AD_RecieveSFXLimiter)
                                      • Unit - Set life of AD_OriginalCaster[AD_Index] to ((Life of AD_OriginalCaster[AD_Index]) + AD_CarriedHealth[AD_Index])
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • AD_Conditions[13] Equal to True
                                          • AD_SFXLimiter Equal to 1
                                        • Then - Actions
                                          • Special Effect - Create a special effect attached to the origin of AD_OriginalCaster[AD_Index] using AD_HealedLifeSFX[AD_Theme[AD_Index]]
                                          • Special Effect - Destroy (Last created special effect)
                                        • Else - Actions
                                  • Set AD_SFXCurrentWaitTimeHpHeal[AD_Index] = 0.00
                                • Else - Actions
                                  • Set AD_SFXCurrentWaitTimeHpHeal[AD_Index] = (AD_SFXCurrentWaitTimeHpHeal[AD_Index] + 1.00)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • AD_Conditions[3] Equal to True
                              • (Mana of AD_TempUnit2) Greater than 0.00
                            • Then - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • AD_SFXCurrentWaitTimeManaHeal[AD_Index] Greater than or equal to AD_SFXWaitTime
                                • Then - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • AD_Conditions[12] Equal to False
                                    • Then - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Mana of AD_TempUnit2) Greater than or equal to AD_ManaDrain[AD_Index]
                                        • Then - Actions
                                          • Unit - Set mana of AD_TempUnit2 to ((Mana of AD_TempUnit2) - AD_ManaDrain[AD_Index])
                                          • Set AD_CarriedMana[AD_Index] = AD_ManaDrain[AD_Index]
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • AD_Conditions[15] Equal to True
                                            • Then - Actions
                                              • Special Effect - Create a special effect attached to the chest of AD_TempUnit2 using AD_DrainedManaSFX[AD_Theme[AD_Index]]
                                              • Special Effect - Destroy (Last created special effect)
                                            • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • AD_Conditions[4] Equal to True
                                            • Then - Actions
                                              • -------- Mana segment creation --------
                                              • Set AD_MaxIndex = (AD_MaxIndex + 1)
                                              • Set AD_TempPoint2 = (Position of AD_OriginalCaster[AD_Index])
                                              • Unit - Create 1 AD_DummyType for AD_TempPlayer at AD_TempPoint facing (Angle from AD_TempPoint to AD_TempPoint2) degrees
                                              • Set AD_TempUnit = (Last created unit)
                                              • Set AD_TempReal = AD_AbilityLevel[AD_Index]
                                              • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_ManaDrainSFX[AD_Theme[AD_Index]]
                                              • Animation - Change AD_TempUnit's size to ((AD_EffectScalingManaBase + (AD_EffectScalingManaPL x AD_TempReal))%, 0.00%, 0.00%) of its original size
                                              • Set AD_OriginalCaster[AD_MaxIndex] = AD_OriginalCaster[AD_Index]
                                              • Set AD_SpecialEffect[AD_MaxIndex] = (Last created special effect)
                                              • Set AD_CarriedHealth[AD_MaxIndex] = 0.00
                                              • Set AD_CarriedMana[AD_MaxIndex] = AD_CarriedMana[AD_Index]
                                              • Set AD_CurrentDistance[AD_MaxIndex] = 0.00
                                              • Set AD_Theme[AD_MaxIndex] = AD_TempInteger2
                                              • Set AD_MaxDistance[AD_MaxIndex] = (Distance between AD_TempPoint and AD_TempPoint2)
                                              • Set AD_MaxHeight[AD_MaxIndex] = (AD_MaxDistance[AD_MaxIndex] x (AD_ManaArcMultiplyerBase + (AD_ManaArcMultiplyerPL x AD_TempReal)))
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • AD_Conditions[5] Equal to True
                                                • Then - Actions
                                                  • Set AD_ManaSpeed[AD_MaxIndex] = (AD_ManaSpeedBase + (AD_ManaSpeedPerLevel x AD_TempReal))
                                                • Else - Actions
                                                  • Set AD_ManaSpeed[AD_MaxIndex] = ((AD_MaxDistance[AD_MaxIndex] x AD_TimerSpeed) / (AD_ManaIncomingTimeBase + (AD_ManaIncomingTimePerLevel x AD_TempReal)))
                                              • Set AD_UnitIndex[AD_MaxIndex] = AD_TempUnit
                                              • Set AD_StageID[AD_MaxIndex] = 4
                                              • Custom script: call RemoveLocation (udg_AD_TempPoint2)
                                            • Else - Actions
                                              • Set AD_SFXLimiter = (Random integer number between 1 and AD_RecieveSFXLimiter)
                                              • Unit - Set mana of AD_OriginalCaster[AD_Index] to ((Mana of AD_OriginalCaster[AD_Index]) + AD_CarriedMana[AD_Index])
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • AD_Conditions[14] Equal to True
                                                  • AD_SFXLimiter Equal to 1
                                                • Then - Actions
                                                  • Special Effect - Create a special effect attached to the chest of AD_OriginalCaster[AD_Index] using AD_HealedManaSFX[AD_Theme[AD_Index]]
                                                  • Special Effect - Destroy (Last created special effect)
                                                • Else - Actions
                                        • Else - Actions
                                          • Set AD_CarriedMana[AD_Index] = 0.00
                                    • Else - Actions
                                      • Set AD_TempReal = (Mana of AD_TempUnit2)
                                      • Unit - Set mana of AD_TempUnit2 to ((Mana of AD_TempUnit2) - AD_ManaDrain[AD_Index])
                                      • Set AD_TempReal2 = (Mana of AD_TempUnit2)
                                      • Set AD_CarriedMana[AD_Index] = (AD_TempReal - AD_TempReal2)
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • AD_Conditions[15] Equal to True
                                        • Then - Actions
                                          • Special Effect - Create a special effect attached to the chest of AD_TempUnit2 using AD_DrainedManaSFX[AD_Theme[AD_Index]]
                                          • Special Effect - Destroy (Last created special effect)
                                        • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • AD_Conditions[4] Equal to True
                                        • Then - Actions
                                          • -------- Mana segment creation --------
                                          • Set AD_MaxIndex = (AD_MaxIndex + 1)
                                          • Set AD_TempPoint2 = (Position of AD_OriginalCaster[AD_Index])
                                          • Unit - Create 1 AD_DummyType for AD_TempPlayer at AD_TempPoint facing (Angle from AD_TempPoint to AD_TempPoint2) degrees
                                          • Set AD_TempUnit = (Last created unit)
                                          • Set AD_TempReal = AD_AbilityLevel[AD_Index]
                                          • Special Effect - Create a special effect attached to the origin of AD_TempUnit using AD_ManaDrainSFX[AD_Theme[AD_Index]]
                                          • Animation - Change AD_TempUnit's size to ((AD_EffectScalingManaBase + (AD_EffectScalingManaPL x AD_TempReal))%, 0.00%, 0.00%) of its original size
                                          • Set AD_OriginalCaster[AD_MaxIndex] = AD_OriginalCaster[AD_Index]
                                          • Set AD_SpecialEffect[AD_MaxIndex] = (Last created special effect)
                                          • Set AD_CarriedHealth[AD_MaxIndex] = 0.00
                                          • Set AD_CarriedMana[AD_MaxIndex] = AD_CarriedMana[AD_Index]
                                          • Set AD_CurrentDistance[AD_MaxIndex] = 0.00
                                          • Set AD_Theme[AD_MaxIndex] = AD_TempInteger2
                                          • Set AD_MaxDistance[AD_MaxIndex] = (Distance between AD_TempPoint and AD_TempPoint2)
                                          • Set AD_MaxHeight[AD_MaxIndex] = (AD_MaxDistance[AD_MaxIndex] x (AD_ManaArcMultiplyerBase + (AD_ManaArcMultiplyerPL x AD_TempReal)))
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • AD_Conditions[5] Equal to True
                                            • Then - Actions
                                              • Set AD_ManaSpeed[AD_MaxIndex] = (AD_ManaSpeedBase + (AD_ManaSpeedPerLevel x AD_TempReal))
                                            • Else - Actions
                                              • Set AD_ManaSpeed[AD_MaxIndex] = ((AD_MaxDistance[AD_MaxIndex] x AD_TimerSpeed) / (AD_ManaIncomingTimeBase + (AD_ManaIncomingTimePerLevel x AD_TempReal)))
                                          • Set AD_UnitIndex[AD_MaxIndex] = AD_TempUnit
                                          • Set AD_StageID[AD_MaxIndex] = 4
                                          • Custom script: call RemoveLocation (udg_AD_TempPoint2)
                                        • Else - Actions
                                          • Set AD_SFXLimiter = (Random integer number between 1 and AD_RecieveSFXLimiter)
                                          • Unit - Set mana of AD_OriginalCaster[AD_Index] to ((Mana of AD_OriginalCaster[AD_Index]) + AD_CarriedMana[AD_Index])
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • AD_Conditions[14] Equal to True
                                              • AD_SFXLimiter Equal to 1
                                            • Then - Actions
                                              • Special Effect - Create a special effect attached to the chest of AD_OriginalCaster[AD_Index] using AD_HealedManaSFX[AD_Theme[AD_Index]]
                                              • Special Effect - Destroy (Last created special effect)
                                            • Else - Actions
                                  • Set AD_SFXCurrentWaitTimeManaHeal[AD_Index] = 0.00
                                • Else - Actions
                                  • Set AD_SFXCurrentWaitTimeManaHeal[AD_Index] = (AD_SFXCurrentWaitTimeManaHeal[AD_Index] + 1.00)
                            • Else - Actions
                        • Else - Actions
                  • Custom script: call DestroyGroup (udg_AD_TempGroup)
                  • Custom script: call RemoveLocation (udg_AD_TempPoint)
                  • Custom script: set udg_AD_TempPoint = null
                  • Custom script: set udg_AD_TempGroup = null
                • Else - Actions
                  • -------- Health Segments control --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • AD_StageID[AD_Index] Equal to 3
                    • Then - Actions
                      • Set AD_TempPoint3 = (Position of AD_OriginalCaster[AD_Index])
                      • Set AD_TempPoint2 = (Position of AD_TempUnit)
                      • Unit - Make AD_TempUnit face AD_OriginalCaster[AD_Index] over 0.00 seconds
                      • Custom script: set udg_AD_TempX = GetUnitX(udg_AD_TempUnit)
                      • Custom script: set udg_AD_TempY = GetUnitY(udg_AD_TempUnit)
                      • Custom script: set udg_AD_Angle = GetUnitFacing(udg_AD_TempUnit) * bj_DEGTORAD
                      • Custom script: call SetUnitX(udg_AD_TempUnit, udg_AD_TempX + udg_AD_HealthSpeed[udg_AD_Index] * Cos(udg_AD_Angle))
                      • Custom script: call SetUnitY(udg_AD_TempUnit, udg_AD_TempY + udg_AD_HealthSpeed[udg_AD_Index] * Sin(udg_AD_Angle))
                      • Set AD_CurrentDistance[AD_Index] = (AD_CurrentDistance[AD_Index] + AD_HealthSpeed[AD_Index])
                      • Animation - Change AD_TempUnit flying height to ((((4.00 x AD_MaxHeight[AD_Index]) / AD_MaxDistance[AD_Index]) x (AD_CurrentDistance[AD_Index] / AD_MaxDistance[AD_Index])) x (AD_MaxDistance[AD_Index] - AD_CurrentDistance[AD_Index])) at 0.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between AD_TempPoint2 and AD_TempPoint3) Less than or equal to 50.00
                        • Then - Actions
                          • Special Effect - Destroy AD_SpecialEffect[AD_Index]
                          • Set AD_SFXLimiter = (Random integer number between 1 and AD_RecieveSFXLimiter)
                          • Unit - Set life of AD_OriginalCaster[AD_Index] to ((Life of AD_OriginalCaster[AD_Index]) + AD_CarriedHealth[AD_Index])
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • AD_Conditions[13] Equal to True
                              • AD_SFXLimiter Equal to 1
                            • Then - Actions
                              • Special Effect - Create a special effect attached to the origin of AD_OriginalCaster[AD_Index] using AD_HealedLifeSFX[AD_Theme[AD_Index]]
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                          • Set AD_StageID[AD_Index] = 5
                        • Else - Actions
                      • Custom script: call RemoveLocation (udg_AD_TempPoint3)
                      • Custom script: call RemoveLocation (udg_AD_TempPoint2)
                      • Custom script: set udg_AD_TempPoint3 = null
                      • Custom script: set udg_AD_TempPoint2 = null
                    • Else - Actions
                      • -------- Mana Segments control --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • AD_StageID[AD_Index] Equal to 4
                        • Then - Actions
                          • Set AD_TempPoint3 = (Position of AD_OriginalCaster[AD_Index])
                          • Set AD_TempPoint2 = (Position of AD_TempUnit)
                          • Unit - Make AD_TempUnit face AD_OriginalCaster[AD_Index] over 0.00 seconds
                          • Custom script: set udg_AD_TempX = GetUnitX(udg_AD_TempUnit)
                          • Custom script: set udg_AD_TempY = GetUnitY(udg_AD_TempUnit)
                          • Custom script: set udg_AD_Angle = GetUnitFacing(udg_AD_TempUnit) * bj_DEGTORAD
                          • Custom script: call SetUnitX(udg_AD_TempUnit, udg_AD_TempX + udg_AD_ManaSpeed[udg_AD_Index] * Cos(udg_AD_Angle))
                          • Custom script: call SetUnitY(udg_AD_TempUnit, udg_AD_TempY + udg_AD_ManaSpeed[udg_AD_Index] * Sin(udg_AD_Angle))
                          • Set AD_CurrentDistance[AD_Index] = (AD_CurrentDistance[AD_Index] + AD_ManaSpeed[AD_Index])
                          • Animation - Change AD_TempUnit flying height to ((((4.00 x AD_MaxHeight[AD_Index]) / AD_MaxDistance[AD_Index]) x (AD_CurrentDistance[AD_Index] / AD_MaxDistance[AD_Index])) x (AD_MaxDistance[AD_Index] - AD_CurrentDistance[AD_Index])) at 0.00
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Distance between AD_TempPoint2 and AD_TempPoint3) Less than or equal to 50.00
                            • Then - Actions
                              • Special Effect - Destroy AD_SpecialEffect[AD_Index]
                              • Unit - Set mana of AD_OriginalCaster[AD_Index] to ((Mana of AD_OriginalCaster[AD_Index]) + AD_CarriedMana[AD_Index])
                              • Set AD_SFXLimiter = (Random integer number between 1 and AD_RecieveSFXLimiter)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • AD_Conditions[14] Equal to True
                                  • AD_SFXLimiter Equal to 1
                                • Then - Actions
                                  • Special Effect - Create a special effect attached to the chest of AD_OriginalCaster[AD_Index] using AD_HealedManaSFX[AD_Theme[AD_Index]]
                                  • Special Effect - Destroy (Last created special effect)
                                • Else - Actions
                              • Set AD_StageID[AD_Index] = 5
                            • Else - Actions
                          • Custom script: call RemoveLocation (udg_AD_TempPoint3)
                          • Custom script: call RemoveLocation (udg_AD_TempPoint2)
                          • Custom script: set udg_AD_TempPoint3 = null
                          • Custom script: set udg_AD_TempPoint2 = null
                        • Else - Actions
                          • -------- Index recycling --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • AD_StageID[AD_Index] Equal to 5
                            • Then - Actions
                              • Set AD_OriginalCaster[AD_Index] = AD_OriginalCaster[AD_MaxIndex]
                              • Set AD_SpecialEffect[AD_Index] = AD_SpecialEffect[AD_MaxIndex]
                              • Set AD_DrainAOE[AD_MaxIndex] = (AD_DrainAreaAOEBase + (AD_DrainAreaAOEPerLevel x AD_TempReal))
                              • Set AD_Duration[AD_Index] = AD_Duration[AD_MaxIndex]
                              • Set AD_AbilityLevel[AD_Index] = AD_AbilityLevel[AD_MaxIndex]
                              • Set AD_HealthDrain[AD_Index] = AD_HealthDrain[AD_MaxIndex]
                              • Set AD_ManaDrain[AD_Index] = AD_ManaDrain[AD_MaxIndex]
                              • Set AD_CarriedHealth[AD_Index] = AD_CarriedHealth[AD_MaxIndex]
                              • Set AD_CarriedMana[AD_Index] = AD_CarriedMana[AD_MaxIndex]
                              • Set AD_CurrentDistance[AD_Index] = AD_CurrentDistance[AD_MaxIndex]
                              • Set AD_SFXCurrentWaitTimeHpHeal[AD_Index] = AD_SFXCurrentWaitTimeHpHeal[AD_MaxIndex]
                              • Set AD_SFXCurrentWaitTimeManaHeal[AD_Index] = AD_SFXCurrentWaitTimeManaHeal[AD_MaxIndex]
                              • Set AD_HealthSpeed[AD_Index] = AD_HealthSpeed[AD_MaxIndex]
                              • Set AD_ManaSpeed[AD_Index] = AD_ManaSpeed[AD_MaxIndex]
                              • Set AD_LaunchSpeed[AD_Index] = AD_LaunchSpeed[AD_MaxIndex]
                              • Set AD_Theme[AD_Index] = AD_Theme[AD_MaxIndex]
                              • Set AD_MaxDistance[AD_Index] = AD_MaxDistance[AD_MaxIndex]
                              • Set AD_MaxHeight[AD_Index] = AD_MaxHeight[AD_MaxIndex]
                              • Set AD_UnitIndex[AD_Index] = AD_UnitIndex[AD_MaxIndex]
                              • Set AD_StageID[AD_Index] = AD_StageID[AD_MaxIndex]
                              • Custom script: set udg_AD_CasterX[udg_AD_Index] = udg_AD_CasterX[udg_AD_MaxIndex]
                              • Custom script: set udg_AD_CasterY[udg_AD_Index] = udg_AD_CasterY[udg_AD_MaxIndex]
                              • Set AD_MaxIndex = (AD_MaxIndex - 1)
                              • Set AD_Index = (AD_Index - 1)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • AD_MaxIndex Equal to 0
                                • Then - Actions
                                  • Trigger - Turn off Arcane Drain Loop <gen>
                                  • Trigger - Turn off Arcane Drain Dummy Removal <gen>
                                • Else - Actions
                              • Unit - Remove AD_TempUnit from the game
                            • Else - Actions

  • Arcane Drain Dummy Removal
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- Clears up draining areas after they expire --------
      • Set AD_TempUnit = (Triggering unit)
      • For each (Integer AD_Index) from 1 to AD_MaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of AD_TempUnit) Equal to AD_DummyType
              • AD_TempUnit Equal to AD_UnitIndex[AD_Index]
            • Then - Actions
              • Set AD_TempPoint = (Position of AD_TempUnit)
              • Special Effect - Destroy AD_SpecialEffect[AD_Index]
              • Special Effect - Create a special effect at AD_TempPoint using AD_EndSFX[AD_Theme[AD_Index]]
              • Special Effect - Destroy (Last created special effect)
              • Set AD_StageID[AD_Index] = 5
              • Custom script: call RemoveLocation (udg_AD_TempPoint)
              • Custom script: set udg_AD_TempPoint = null
            • Else - Actions



Changelog

-=V1.00=-
- Initial upload
-=V1.01=-
- Updated tooltip
- Altered some SFX to make the themes more consistent
- Changed to a channeling (Can cast multiple times if you stay in the same location, but not move)
- Made the spell cancellable (just issue any other order
- Added minimum spread out range configurable
- Added new SFX "Cancel sfx" (defaults set to the same as end spell sfx) also configurable
- Reduced amount of SFX (increase configurable "SFX Wait") so if you still have issues, increase that some more
- Modified dummy removal trigger so it is initially off/turned off
-=V1.02=-
- Moved button
- nulled variables after use
- Made order configurable


Message me, if you find any errors, considering how much indentation was needed for all the configurables, I've probably made a mistake somewhere, so I'd appreciate the heads-up so I can fix any issues as early as I get the chance

Give credits if you use this in your map, and I hope you enjoy it.
(Try casting at each level, and play around with the configurables)

Keywords:
Arcane, Drain, Overly configurable, Leech, Changes, Thematic, Absorb, Steal, AOE, SFX, Magik, Magic, Mana, Health.
Contents

Arcane Drain (Map)

Reviews
Moderator
Arcane Drain V1.00 | Reviewed by Maker | 19th Mar 2013 APPROVED [tr] [IMG] The ability is MUI The ability is leakless Excellent configuration options
  1. Arcane Drain V1.00 | Reviewed by Maker | 19th Mar 2013
    APPROVED

    [​IMG]
    • The ability is MUI
    • The ability is leakless
    • Excellent configuration options


     
  2. UndeadImmortal

    UndeadImmortal

    Joined:
    Jun 27, 2011
    Messages:
    1,584
    Resources:
    7
    Maps:
    7
    Resources:
    7
    This is just pure awesomeness!
     
  3. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,039
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Wow, a great configurable spell, must be a nice spell and awesome :D (didn't test) 5/5
     
  4. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,608
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Dat wall of code o_O

    Since I dont want to spend 10 mins reading I give it 5/5 fof the effoft
     
  5. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Thank you all for the kind words ^^
     
  6. HammerFist132

    HammerFist132

    Joined:
    Mar 22, 2012
    Messages:
    1,314
    Resources:
    17
    Models:
    11
    Icons:
    2
    Maps:
    2
    Spells:
    2
    Resources:
    17
    Man u just love to create a loooooooooooooooooooooooooooooooooooooooot of effects. Is there any low effect spell made by u :)
     
  7. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Not any of my more recent ones no, what can I say? I like a good-looking spell XD
     
  8. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    YAY! New spell :D
    I was going to ask you to make one :D

    (You are a bit , "arcanic" XD)

    (Random real number between 90.00 and (AD_AoeBase + (AD_AoePerLevel x AD_TempReal)))

    I think 90 is configurable.

    Also,i think i should improve your parabola equation(its too long)
    use this:
    4*height*trav*(dist - trav) / (dist * dist)


    I should give the commander a +rep :D
     
  9. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Show

    [​IMG]
    OMG dem orb be comin! RUN!
     
  10. HammerFist132

    HammerFist132

    Joined:
    Mar 22, 2012
    Messages:
    1,314
    Resources:
    17
    Models:
    11
    Icons:
    2
    Maps:
    2
    Spells:
    2
    Resources:
    17
    Personaly I dont thhink to ur spells could be usefull for anykind of pvp maps, but I think to they would be awesome for some boss fight and dungeon stile maps.
    +2 rep
     
  11. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Should note that, that effect is actually intentional, despite it's strange looking-ness, though I will look to make the modifications you have suggested with making it a channeling spell, so that cannot happen

    I'll change the "SFX wait time" in the config to a higher value, will lower all the sfx amount and change nothing else, As for dummy removal, just give me a second

    I'll just modify the model used for the 1st theme, not really any issue there, but more a demonstration of different themes more than anything else

    I was rather lazy with this I know, so I'll be adding that in the next update

    I'll fix that by making it channeled
     
  12. iChaos

    iChaos

    Joined:
    May 4, 2012
    Messages:
    167
    Resources:
    0
    Resources:
    0
    The triggers... NGA NGA
     
  13. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,039
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Ok...
     
  14. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    There, updated with all the requested changes.
     
  15. shadowvzs

    shadowvzs

    Joined:
    Nov 13, 2006
    Messages:
    1,803
    Resources:
    2
    Spells:
    2
    Resources:
    2
    its look cool but if i cast twice for me lagging enough well :/
     
  16. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Then increase the SFX wait time, I did say this already XD

    Alternatively use the configurables to not display some of the sfx and your lag will disappear, I didn't put them in there to be ignored XD
     
  17. T. D. W.

    T. D. W.

    Joined:
    Jul 31, 2012
    Messages:
    1,505
    Resources:
    5
    Spells:
    5
    Resources:
    5
    Your spell is awesome especially when you make the casting range 10000 and cooldown 0

    It lags a lot lot lot but looks great 5/5 +rep
     
  18. NyQz

    NyQz

    Joined:
    Mar 24, 2013
    Messages:
    40
    Resources:
    0
    Resources:
    0
    Well, spell looks good, but it lags for me, huh :S
     
  19. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Read the spell description