🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
=================== Destructive Sphere v1.2
===================
Any Jujutsu Kaisen fan here? I bring to you, Hollow: Purple! *coughs* I mean Destructive Sphere! I just had to change it. Firstly, because it would be too OP in Warcraft-verse. Secondly, because it takes way too long to charge. Thirdly, it isn't exactly purple. Anyway! This can be useful for Anime maps or as a spell for bossfights.
Please don't forget to give me credits if you use this in your map. As well as other authors who own the models I'm using for this spell if you do use it as well.
Description:
How to Import:
1. Copy "Destructive Sphere" ability from object editor
2. Copy "Destructive Sphere" buff from object editor
3. Copy "Destructive Sphere (Burn Effect)" ability from object editor
4. Import SuperLightningBall model file from this link -> https://www.hiveworkshop.com/threads/superlightningball.336706/
and Import NuclearExplosion5 model file from this link -> https://www.hiveworkshop.com/threads/nuclear-explosion-no-missile.151336/
and Import WindCircleFaster model file from this link -> https://www.hiveworkshop.com/threads/various-anime-winds-dust-1-1.317273/
or just export the ones in this map and import it to your map. Don't forget to credit each author of these awesome models.
5. Copy DestructiveSphere Dummies (DestructiveSpherePurple, DestructiveSphereBlue, DestructiveSphereRed, Destructive Sphere Caster) from object editor
6. Make sure your World Editor has "Automatically Create Unknown Variable" enabled. You can find it in File => Preferences
7. Copy all the triggers in "Destructive Sphere" folder
8. Make sure the variables are assigned properly
9. Enjoy!
DestructiveSphere Config
Events
Map initialization
Conditions
Actions
-------- ---------------- --------
-------- This is configuration part of the spell --------
-------- You can change the values to whatever you desire to certain extent --------
-------- ---------------- --------
-------- Make sure the following variable store the ability you will use in object editor for this spell --------
Set DESP_Ability = Destructive Sphere
-------- ---------------- --------
-------- Make sure the following variable store the Base Order Id of your ability --------
-------- By default, it uses blizzard. Change this accordingly if you change your base ability --------
Set DESP_OrderId = blizzard
-------- ---------------- --------
-------- Making sure our DummyCaster has the damage over time ability (Default is based on Parasite) --------
Set DESP_DummyAbility = Destructive Sphere (Burn Effect)
-------- ---------------- --------
-------- Making sure our TreeDestroyer Dummy has Harvest (Lumber) ability in their skill slot --------
Set DESP_TreeDestAbility = Harvest (Ghouls Lumber)
-------- ---------------- --------
-------- These are dummy units we will use in the spell --------
-------- Make sure these have the correct values as the dummy units in object editor --------
-------- DBA_DummyType[1] is blue lightning ball which will be summoned to the caster's left --------
-------- DBA_DummyType[2] is red lightning ball which will be summoned to the caster's right --------
-------- DBA_DummyType[3] is the main dummy used as the projectile --------
-------- DBA_DummyType[4] is dummy who'll cast a damage over time ability at the enemy units --------
-------- DBA_DummyType[5] is our TreeDestroyer, default is Peasant. --------
Set DESP_DummyType[1] = DestructiveSphereBlue
Set DESP_DummyType[2] = DestructiveSphereRed
Set DESP_DummyType[3] = DestructiveSpherePurple
Set DESP_DummyType[4] = DestructiveSphereCaster
Set DESP_DummyType[5] = Peasant
-------- ---------------- --------
-------- This will determine the size/scale of our dummy unit per level --------
-------- Dummy1 is blue lightning ball which will be summoned to the caster's left --------
Set DESP_Dummy1Size[1] = 3.00
Set DESP_Dummy1Size[2] = 3.00
Set DESP_Dummy1Size[3] = 3.00
-------- ---------------- --------
-------- This will determine the height of our dummy unit per level --------
-------- Dummy1 is blue lightning ball which will be summoned to the caster's left --------
Set DESP_Dummy1Height[1] = 100.00
Set DESP_Dummy1Height[2] = 100.00
Set DESP_Dummy1Height[3] = 100.00
-------- ---------------- --------
-------- This will determine the size of our dummy unit per level --------
-------- Dummy2 is red lightning ball which will be summoned to the caster's right --------
Set DESP_Dummy2Size[1] = 6.00
Set DESP_Dummy2Size[2] = 6.00
Set DESP_Dummy2Size[3] = 6.00
-------- ---------------- --------
-------- This will determine the height of our dummy unit per level --------
-------- Dummy2 is red lightning ball which will be summoned to the caster's right --------
Set DESP_Dummy2Height[1] = 70.00
Set DESP_Dummy2Height[2] = 70.00
Set DESP_Dummy2Height[3] = 70.00
-------- ---------------- --------
-------- This will determine the size of our dummy unit per level --------
-------- Dummy3 is the main dummy used as the projectile --------
Set DESP_Dummy3Size[1] = 1.00
Set DESP_Dummy3Size[2] = 1.00
Set DESP_Dummy3Size[3] = 1.00
-------- ---------------- --------
-------- This will determine the height of our dummy unit per level --------
-------- Dummy3 is the main dummy used as the projectile --------
Set DESP_Dummy3Height[1] = 0.00
Set DESP_Dummy3Height[2] = 0.00
Set DESP_Dummy3Height[3] = 0.00
-------- ---------------- --------
-------- These variables will determine the starting offset where each dummy will be spawned --------
-------- Dummy 1 is in front of the caster, the offset is the distance between the two. --------
-------- Dummy 2 is left of Dummy 1, the offset is the distance between the two. --------
-------- Dummy 3 is right of Dummy 1, the offset is the distance between the two. --------
Set DESP_D1StartOffset = 150.00
Set DESP_D2StartOffset = 150.00
Set DESP_D3StartOffset = 150.00
-------- ---------------- --------
-------- These variables will determine the delay time before the dummy is spawned --------
-------- Note: they spawn in order. Delay value is applied before each spawn. --------
Set DESP_D1SpawnDelay = 1.00
Set DESP_D2SpawnDelay = 1.00
Set DESP_D3SpawnDelay = 0.50
-------- ---------------- --------
-------- These variables will determine the delay time before the dummies merge --------
Set DESP_MergeDelay = 1.00
-------- ---------------- --------
-------- These variables will determine the special effects used by the spell --------
-------- These ones will appear when first sphere is summoned --------
Set DESP_Effect[1] = Abilities\Weapons\Bolt\BoltImpact.mdl
Set DESP_Effect[2] = war3mapImported\WindCirclefaster.mdx
-------- These ones will appear when second sphere is summoned --------
Set DESP_Effect[3] = Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
Set DESP_Effect[4] = war3mapImported\WindCirclefaster.mdx
-------- These ones will appear when third sphere is summoned --------
Set DESP_Effect[5] = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Set DESP_Effect[6] = Abilities\Weapons\Bolt\BoltImpact.mdl
Set DESP_Effect[7] = Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
Set DESP_Effect[8] = war3mapImported\WindCirclefaster.mdx
-------- These ones will appear when the third sphere is moving --------
Set DESP_Effect[9] = Abilities\Spells\Other\Tornado\Tornado_Target.mdl
Set DESP_Effect[10] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Set DESP_Effect[11] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-------- These ones will appear when the explosion appears --------
Set DESP_Effect[12] = war3mapImported\WindCirclefaster.mdx
Set DESP_Effect[13] = war3mapImported\NuclearExplosion5.mdx
-------- ---------------- --------
-------- This variable will determine the damage for the projectile per level --------
Set DESP_ProjectileDmg[1] = 200.00
Set DESP_ProjectileDmg[2] = 350.00
Set DESP_ProjectileDmg[3] = 500.00
-------- ---------------- --------
-------- This variable will determine the damage for the explosion per level --------
Set DESP_FinalDmg[1] = 100.00
Set DESP_FinalDmg[2] = 175.00
Set DESP_FinalDmg[3] = 250.00
-------- ---------------- --------
-------- These variables will determine what kind of attack type is used by the spell --------
-------- AttackType1 refers to ProjectileDmg --------
-------- AttackType2 refers to FinalDmg --------
Set DESP_AttackType1 = Spells
Set DESP_AttackType2 = Spells
-------- ---------------- --------
-------- These variables will determine what kind of damage type is used by the spell --------
-------- DamageType1 refers to ProjectileDmg --------
-------- DamageType2 refers to FinalDmg --------
Set DESP_DamageType1 = Magic
Set DESP_DamageType2 = Magic
-------- ---------------- --------
-------- Do you want this spell to explode at a fixed distance? If yes, set it to true. If no, set it to false. --------
-------- When set to false, the spell will explode at the target location --------
Set DESP_FixedDistance = True
-------- ---------------- --------
-------- This variable will determine the maximum distance for the spell per level --------
-------- Applied when DESP_FixedDistance = true --------
Set DESP_MaxDistance[1] = 1500.00
Set DESP_MaxDistance[2] = 1500.00
Set DESP_MaxDistance[3] = 1500.00
-------- ---------------- --------
-------- This variable will determine the speed for the projectile per level --------
Set DESP_BaseSpeed[1] = 1000.00
Set DESP_BaseSpeed[2] = 1000.00
Set DESP_BaseSpeed[3] = 1000.00
-------- ---------------- --------
-------- This variable will determine the speed for the blue and red lightning when they attempt to merge --------
-------- I'd recommend not to use high numbers on this, as the spell will not move as intended when you do --------
Set DESP_MergeBaseSpeed[1] = 300.00
Set DESP_MergeBaseSpeed[2] = 300.00
Set DESP_MergeBaseSpeed[3] = 300.00
-------- ---------------- --------
-------- This variable will determine the area of effect for the projectile per level --------
Set DESP_ProjectileAoe[1] = 250.00
Set DESP_ProjectileAoe[2] = 250.00
Set DESP_ProjectileAoe[3] = 250.00
-------- ---------------- --------
-------- This variable will determine the area of effect for the explosion per level --------
Set DESP_FinalAoe[1] = 500.00
Set DESP_FinalAoe[2] = 500.00
Set DESP_FinalAoe[3] = 500.00
-------- ---------------- --------
-------- Do you want this spell to also deal damage to friendly units? If yes, set it to true. If no, set it to false. --------
Set DESP_FriendlyFire = True
-------- ---------------- --------
-------- How much damage should friendly units take? --------
-------- 2 = Double damage --------
-------- 1 = Full damage --------
-------- 0.5 = Half damage --------
Set DESP_FriendlyDmgFactor[1] = 0.50
Set DESP_FriendlyDmgFactor[2] = 0.50
Set DESP_FriendlyDmgFactor[3] = 0.50
-------- ---------------- --------
-------- Do you want this spell to also deal damage to buildings? If yes, set it to true. If no, set it to false. --------
Set DESP_DamageBuilding = True
-------- ---------------- --------
-------- How much damage should building units take? --------
-------- Note: This calculation will be based off the result of FriendlyDamage Calculation --------
-------- 2 = Double damage --------
-------- 1 = Full damage --------
-------- 0.5 = Half damage --------
Set DESP_BuildingDmgFactor[1] = 0.50
Set DESP_BuildingDmgFactor[2] = 0.50
Set DESP_BuildingDmgFactor[3] = 0.50
-------- ---------------- --------
-------- Do you want this spell to have a burn effect after the explosion? If yes, set it to true. If no, set it to false. --------
Set DESP_BurnEffect = True
-------- ---------------- --------
-------- Do you want this spell to destroy trees? If yes, set it to true. If no, set it to false. --------
Set DESP_DestroyTree = True
-------- ---------------- --------
-------- +> OFF LIMIT <+ --------
-------- Do not change anything below this point --------
-------- or else the spell might not work as intended --------
-------- make sure you know what you are doing --------
-------- ---------------- --------
Set DESP_Loc[1] = (Center of (Playable map area))
-------- ---------------- --------
-------- Preload dummy units --------
Unit - Create 1 DESP_DummyType[1] for Neutral Passive at DESP_Loc[1] facing Default building facing degrees
Unit - Remove (Last created unit) from the game
Unit - Create 1 DESP_DummyType[2] for Neutral Passive at DESP_Loc[1] facing Default building facing degrees
Unit - Remove (Last created unit) from the game
Unit - Create 1 DESP_DummyType[3] for Neutral Passive at DESP_Loc[1] facing Default building facing degrees
Unit - Remove (Last created unit) from the game
Unit - Create 1 DESP_DummyType[4] for Neutral Passive at DESP_Loc[1] facing Default building facing degrees
-------- ---------------- --------
-------- Preload special effects --------
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[1]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[2]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[3]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[4]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[5]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[6]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[7]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[8]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[9]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[10]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[11]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[12]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using DESP_Effect[13]
Special Effect - Destroy (Last created special effect)
-------- ---------------- --------
-------- Preload abilities --------
Unit - Add DESP_Ability to (Last created unit)
Unit - Remove DESP_Ability from (Last created unit)
Unit - Add DESP_DummyAbility to (Last created unit)
Unit - Remove DESP_DummyAbility from (Last created unit)
Unit - Add DESP_TreeDestAbility to (Last created unit)
Unit - Remove DESP_TreeDestAbility from (Last created unit)
Unit - Remove (Last created unit) from the game
-------- ---------------- --------
-------- Create DummyCaster if BurnEffect is true --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_BurnEffect Equal to True
Then - Actions
Unit - Create 1 DESP_DummyType[4] for Neutral Passive at DESP_Loc[1] facing Default building facing degrees
Set DESP_DummyCaster = (Last created unit)
Unit - Add DESP_DummyAbility to DESP_DummyCaster
Unit - Hide DESP_DummyCaster
Else - Actions
-------- ---------------- --------
-------- Create TreeDestroyer if DestroyTree is true --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DestroyTree Equal to True
Then - Actions
Unit - Create 1 DESP_DummyType[5] for Neutral Passive at DESP_Loc[1] facing Default building facing degrees
Set DESP_TreeDestroyer = (Last created unit)
Unit - Add DESP_TreeDestAbility to DESP_TreeDestroyer
Unit - Hide DESP_TreeDestroyer
Else - Actions
-------- ---------------- --------
-------- This variable will determine the interval of periodic timer used by our loop trigger --------
-------- Don't change this unless you know what you're doing --------
Set DESP_Interval = 0.03
-------- ---------------- --------
Set DESP_LoopTrigger = DestructiveSphere Loop <gen>
Trigger - Add to DESP_LoopTrigger the event (Time - Every DESP_Interval seconds of game time)
For each (Integer DESP_LoopInt) from 1 to DESP_SpellCount, do (Actions)
Loop - Actions
Set DESP_Spell_ID = DESP_NodeNext[DESP_Spell_ID]
-------- Check if caster is channeling --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of DESP_Caster[DESP_Spell_ID]) Equal to (Order(DESP_OrderId))
Then - Actions
-------- Stage 1 - Create the blue lightning ball to the left --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Stage[DESP_Spell_ID] Equal to 1
Then - Actions
-------- Check if timer is up --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Counter[DESP_Spell_ID] Greater than or equal to DESP_D1SpawnDelay
Then - Actions
-------- It's up; Create the blue lightning sphere --------
Set DESP_Loc[1] = (DESP_StartLoc[DESP_Spell_ID] offset by DESP_D1StartOffset towards DESP_AngleLeft[DESP_Spell_ID] degrees)
Unit - Create 1 DESP_DummyType[1] for Neutral Passive at DESP_Loc[1] facing DESP_Angle[DESP_Spell_ID] degrees
Set DESP_Dummy2nd[DESP_Spell_ID] = (Last created unit)
-------- change its size and height --------
Animation - Change DESP_Dummy2nd[DESP_Spell_ID]'s size to ((DESP_Dummy1Size[DESP_Level[DESP_Spell_ID]] x 100.00)%, (DESP_Dummy1Size[DESP_Level[DESP_Spell_ID]] x 100.00)%, (DESP_Dummy1Size[DESP_Level[DESP_Spell_ID]] x 100.00)%) of its original size
Animation - Change DESP_Dummy2nd[DESP_Spell_ID] flying height to DESP_Dummy1Height[DESP_Level[DESP_Spell_ID]] at 0.00
-------- create special effects --------
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[1]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[2]
Special Effect - Destroy (Last created special effect)
-------- It's not up yet; Increase counter --------
Set DESP_Counter[DESP_Spell_ID] = (DESP_Counter[DESP_Spell_ID] + DESP_Interval)
Else - Actions
-------- Stage 2 - Create the red lightning ball to the right --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Stage[DESP_Spell_ID] Equal to 2
Then - Actions
-------- Check if timer is up --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Counter[DESP_Spell_ID] Greater than or equal to DESP_D3SpawnDelay
Then - Actions
-------- It's up; Create the red lightning sphere --------
Set DESP_Loc[1] = (DESP_StartLoc[DESP_Spell_ID] offset by DESP_D2StartOffset towards DESP_AngleRight[DESP_Spell_ID] degrees)
Unit - Create 1 DESP_DummyType[2] for Neutral Passive at DESP_Loc[1] facing DESP_Angle[DESP_Spell_ID] degrees
Set DESP_Dummy3rd[DESP_Spell_ID] = (Last created unit)
-------- change its size and height --------
Animation - Change DESP_Dummy3rd[DESP_Spell_ID]'s size to ((DESP_Dummy2Size[DESP_Level[DESP_Spell_ID]] x 100.00)%, (DESP_Dummy2Size[DESP_Level[DESP_Spell_ID]] x 100.00)%, (DESP_Dummy2Size[DESP_Level[DESP_Spell_ID]] x 100.00)%) of its original size
Animation - Change DESP_Dummy3rd[DESP_Spell_ID] flying height to DESP_Dummy2Height[DESP_Level[DESP_Spell_ID]] at 0.00
-------- create special effects --------
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[3]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[4]
Special Effect - Destroy (Last created special effect)
-------- It's not up yet; Increase counter --------
Set DESP_Counter[DESP_Spell_ID] = (DESP_Counter[DESP_Spell_ID] + DESP_Interval)
Else - Actions
-------- Stage 4 - Create the main projectile --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Stage[DESP_Spell_ID] Equal to 4
Then - Actions
-------- Check if timer is up --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Counter[DESP_Spell_ID] Greater than or equal to DESP_D1SpawnDelay
Then - Actions
-------- It's up; Create the sphere --------
Unit - Create 1 DESP_DummyType[3] for Neutral Passive at DESP_StartLoc[DESP_Spell_ID] facing DESP_Angle[DESP_Spell_ID] degrees
Set DESP_DummyProjectile[DESP_Spell_ID] = (Last created unit)
-------- change its size and height --------
Animation - Change DESP_DummyProjectile[DESP_Spell_ID]'s size to ((DESP_Dummy3Size[DESP_Level[DESP_Spell_ID]] x 100.00)%, (DESP_Dummy3Size[DESP_Level[DESP_Spell_ID]] x 100.00)%, (DESP_Dummy3Size[DESP_Level[DESP_Spell_ID]] x 100.00)%) of its original size
Animation - Change DESP_DummyProjectile[DESP_Spell_ID] flying height to DESP_Dummy3Height[DESP_Level[DESP_Spell_ID]] at 0.00
-------- create special effects --------
Special Effect - Create a special effect at DESP_StartLoc[DESP_Spell_ID] using DESP_Effect[5]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_StartLoc[DESP_Spell_ID] using DESP_Effect[6]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_StartLoc[DESP_Spell_ID] using DESP_Effect[7]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_StartLoc[DESP_Spell_ID] using DESP_Effect[8]
Special Effect - Destroy (Last created special effect)
-------- kill red and blue lightning dummy --------
Unit - Kill DESP_Dummy2nd[DESP_Spell_ID]
Unit - Kill DESP_Dummy3rd[DESP_Spell_ID]
-------- reset counter --------
Set DESP_Counter[DESP_Spell_ID] = 0.00
-------- go to next stage --------
Set DESP_Stage[DESP_Spell_ID] = 5
Else - Actions
-------- It's not up yet; Increase counter --------
Set DESP_Counter[DESP_Spell_ID] = (DESP_Counter[DESP_Spell_ID] + DESP_Interval)
Else - Actions
Else - Actions
-------- caster is either finished or interrupted --------
-------- check if the spell has reached stage 5 --------
-------- Stage 5 - Move the main projectile --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_Stage[DESP_Spell_ID] Equal to 5
Then - Actions
-------- It has; check if it has reached max distance --------
Set DESP_Loc[1] = (Position of DESP_DummyProjectile[DESP_Spell_ID])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_CurrentDistance[DESP_Spell_ID] Greater than or equal to DESP_TargetDistance[DESP_Spell_ID]
Then - Actions
-------- It has; kill dummy unit --------
Unit - Kill DESP_DummyProjectile[DESP_Spell_ID]
-------- create special effects --------
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[12]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[13]
Special Effect - Destroy (Last created special effect)
-------- enumerate units within range --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within DESP_FinalAoe[DESP_Level[DESP_Spell_ID]] of DESP_Loc[1]) and do (Actions)
Loop - Actions
Set DESP_TempUnit = (Picked unit)
-------- Initial Filtering --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is alive) Equal to True
DESP_TempUnit Not equal to DESP_Caster[DESP_Spell_ID]
(DESP_TempUnit is in DESP_UndamagedGroup2[DESP_Spell_ID]) Equal to False
Then - Actions
-------- Another filtering for enemy units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit belongs to an enemy of DESP_Owner[DESP_Spell_ID]) Equal to True
Then - Actions
-------- Another filtering for building type units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DamageBuilding Equal to True
Then - Actions
-------- If it's not a structure, deal normal damage. If it's a structure, deal damage * BuildingDmgFactor --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to True
Then - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing (DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] x DESP_BuildingDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType2 and damage type DESP_DamageType2
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup2[DESP_Spell_ID]
-------- - --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - DESP_FinalDmg[DESP_Level[DESP_Spell_ID]])
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] damage of attack type DESP_AttackType2 and damage type DESP_DamageType2
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup2[DESP_Spell_ID]
-------- cast "burn effect" to enemy units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_BurnEffect Equal to True
Then - Actions
Unit - Order DESP_DummyCaster to Neutral - Parasite DESP_TempUnit
Else - Actions
-------- - --------
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - DESP_FinalDmg[DESP_Level[DESP_Spell_ID]])
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] damage of attack type DESP_AttackType2 and damage type DESP_DamageType2
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup2[DESP_Spell_ID]
-------- cast "burn effect" to enemy units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_BurnEffect Equal to True
Then - Actions
Unit - Order DESP_DummyCaster to Neutral - Parasite DESP_TempUnit
Else - Actions
-------- - --------
Else - Actions
Else - Actions
-------- Another filtering for friendly units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_FriendlyFire Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit belongs to an enemy of DESP_Owner[DESP_Spell_ID]) Equal to False
Then - Actions
-------- Another filtering for building type units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DamageBuilding Equal to True
Then - Actions
-------- If it's not a structure, deal normal damage. If it's a structure, deal damage * BuildingDmgFactor --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to True
Then - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing ((DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]) x DESP_BuildingDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType2 and damage type DESP_DamageType2
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup2[DESP_Spell_ID]
-------- - --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - (DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]))
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing (DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType2 and damage type DESP_DamageType2
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup2[DESP_Spell_ID]
-------- cast "burn effect" to friendly units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_BurnEffect Equal to True
Then - Actions
Unit - Order DESP_DummyCaster to Neutral - Parasite DESP_TempUnit
Else - Actions
-------- - --------
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - (DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]))
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing (DESP_FinalDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType2 and damage type DESP_DamageType2
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup2[DESP_Spell_ID]
-------- cast "burn effect" to friendly units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_BurnEffect Equal to True
Then - Actions
Unit - Order DESP_DummyCaster to Neutral - Parasite DESP_TempUnit
Else - Actions
-------- - --------
Else - Actions
Else - Actions
Else - Actions
Else - Actions
-------- check if end-user wants to destroy tree from the config --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DestroyTree Equal to True
Then - Actions
-------- enumerate destructibles within range --------
Destructible - Pick every destructible within DESP_ProjectileAoe[DESP_Level[DESP_Spell_ID]] of DESP_Loc[1] and do (Actions)
Loop - Actions
Set DESP_TempDest = (Picked destructible)
Unit - Order DESP_TreeDestroyer to Harvest DESP_TempDest
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of DESP_TreeDestroyer) Equal to (Order(harvest))
Then - Actions
Destructible - Kill DESP_TempDest
Else - Actions
Unit - Order DESP_TreeDestroyer to Stop
Else - Actions
-------- go to next stage --------
Set DESP_Stage[DESP_Spell_ID] = 6
Else - Actions
-------- It has not; move it --------
Set DESP_Loc[2] = (DESP_Loc[1] offset by DESP_Speed[DESP_Spell_ID] towards DESP_Angle[DESP_Spell_ID] degrees)
Set DESP_Loc[3] = (DESP_Loc[1] offset by 100.00 towards DESP_AngleRight[DESP_Spell_ID] degrees)
Set DESP_Loc[4] = (DESP_Loc[1] offset by 100.00 towards DESP_AngleLeft[DESP_Spell_ID] degrees)
Unit - Move DESP_DummyProjectile[DESP_Spell_ID] instantly to DESP_Loc[2]
-------- track how far it has traveled --------
Set DESP_CurrentDistance[DESP_Spell_ID] = (DESP_CurrentDistance[DESP_Spell_ID] + DESP_Speed[DESP_Spell_ID])
-------- create special effects --------
Special Effect - Create a special effect at DESP_Loc[1] using DESP_Effect[9]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_Loc[3] using DESP_Effect[10]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at DESP_Loc[4] using DESP_Effect[11]
Special Effect - Destroy (Last created special effect)
-------- enumerate units within range --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within DESP_ProjectileAoe[DESP_Level[DESP_Spell_ID]] of DESP_Loc[1]) and do (Actions)
Loop - Actions
Set DESP_TempUnit = (Picked unit)
-------- Initial Filtering --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is alive) Equal to True
DESP_TempUnit Not equal to DESP_Caster[DESP_Spell_ID]
(DESP_TempUnit is in DESP_UndamagedGroup[DESP_Spell_ID]) Equal to False
Then - Actions
-------- Another filtering for enemy units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit belongs to an enemy of DESP_Owner[DESP_Spell_ID]) Equal to True
Then - Actions
-------- Another filtering for building type units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DamageBuilding Equal to True
Then - Actions
-------- If it's not a structure, deal normal damage. If it's a structure, deal damage * BuildingDmgFactor --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to True
Then - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing (DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] x DESP_BuildingDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType1 and damage type DESP_DamageType1
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup[DESP_Spell_ID]
-------- - --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]])
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] damage of attack type DESP_AttackType1 and damage type DESP_DamageType1
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup[DESP_Spell_ID]
-------- - --------
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]])
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] damage of attack type DESP_AttackType1 and damage type DESP_DamageType1
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup[DESP_Spell_ID]
-------- - --------
Else - Actions
Else - Actions
-------- Another filtering for friendly units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_FriendlyFire Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit belongs to an enemy of DESP_Owner[DESP_Spell_ID]) Equal to False
Then - Actions
-------- Another filtering for building type units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DamageBuilding Equal to True
Then - Actions
-------- If it's not a structure, deal normal damage. If it's a structure, deal damage * BuildingDmgFactor --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to True
Then - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing ((DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]) x DESP_BuildingDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType1 and damage type DESP_DamageType1
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup[DESP_Spell_ID]
-------- - --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - (DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]))
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing (DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType1 and damage type DESP_DamageType1
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup[DESP_Spell_ID]
-------- - --------
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DESP_TempUnit is A structure) Equal to False
Then - Actions
-------- explodes the enemy units if their health is already within killing treshold --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
0.42 Greater than ((Life of DESP_TempUnit) - (DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]))
Then - Actions
Unit - Make DESP_TempUnit Explode on death
Else - Actions
-------- deal damage and add them to unit group to prevent taking damage more than once --------
Unit - Cause DESP_Caster[DESP_Spell_ID] to damage DESP_TempUnit, dealing (DESP_ProjectileDmg[DESP_Level[DESP_Spell_ID]] x DESP_FriendlyDmgFactor[DESP_Level[DESP_Spell_ID]]) damage of attack type DESP_AttackType1 and damage type DESP_DamageType1
Unit Group - Add DESP_TempUnit to DESP_UndamagedGroup[DESP_Spell_ID]
-------- - --------
Else - Actions
Else - Actions
Else - Actions
Else - Actions
-------- check if end-user wants to destroy tree from the config --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DESP_DestroyTree Equal to True
Then - Actions
-------- enumerate destructibles within range --------
Destructible - Pick every destructible within DESP_ProjectileAoe[DESP_Level[DESP_Spell_ID]] of DESP_Loc[1] and do (Actions)
Loop - Actions
Set DESP_TempDest = (Picked destructible)
Unit - Order DESP_TreeDestroyer to Harvest DESP_TempDest
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of DESP_TreeDestroyer) Equal to (Order(harvest))
You're making your life a lot harder than you have to with those condition. You can put all of these into one block and check for valid targets with:
(DESP_DamageBuilding Equal to True) or ((DESP_TempUnit is A structure) Equal to False)...
Feedbacks and criticisms are very much welcomed. Please let me know if there's something I miss in the code. And just to remind you, I'm a clumsy one. Hope you enjoy the spell, cheers!
Very good ability and well made. I just really wish the units became traumized for that huge kamehameha on their faces somehow, maybe a -X armor or burning for some time
Haha, that's a good idea. I didn't think of that because I was too focused on working with the special effects at the time, trying to make it look good. Burning effect might fit more due to explosion in the end. I shall add it in the next update. Thanks for the feedback and the rating!
Edit:
Updated to v1.1
Added abilities preload to Config Trigger
Stored Peasant into DESP_DummyType[5] variable in Config Trigger
Make enemy units explode on death, both by projectile and by explosion
Added New Custom Ability (based on Parasite) and Buff for Burn Effect in Object Editor
Added Ability Variable to store the Burn Effect ability
Added Boolean Variable to make the Burn Effect optional
Burn Effect is only applied when the final explosion occurs
Added New Custom Unit; DestructiveSphereCaster
Added Unit Variable to store the Newly added dummy
Heroes in the test map now start at level 10 (So you can easily level up the ability right away)
Updated Import Instruction to match with the new changes
Ok, I have to fact-check you on the physics in that description. That makes no sense .
In the config descriptions, you have a grammar error here: "Delay value is applied after before each spawn."
The dummy offset variables are a bit confusing, especially since I only learn the chapter below that dummy 1 isn't actually the first dummy that spawns. Consider swapping those two. You could also expand the description a bit and be more clear:
"Dummy 1 is in front of the caster, the offset is the distance between the two."
"Dummy 2 is left of Dummy 1, the offset is the distance between the two."
etc.
I'm really missing an option to enable damage on buildings for this spell. Makes no sense to me that a nuclear explosion would leave a building completely unharmed. An option to enable friendly-fire would also be great.
What also bugs me, and I think what makes this spell a bit unhandy to use as a player, is that the lightning sphere explodes at a fixed distance. I think it should explode at the point of the spell target. Or even better, make that an option.
Other than that, this is another fantastic looking, well-written spell and perfect for a hero's ultimate. I'm hesitant to give it HQ, because of the missing features I really think it should have, but I'll up it to HQ right away when you can add them.
You're making your life a lot harder than you have to with those condition. You can put all of these into one block and check for valid targets with:
(DESP_DamageBuilding Equal to True) or ((DESP_TempUnit is A structure) Equal to False)
(DESP_FriendlyFire Equal to True) or ((DESP_TempUnit belongs to an enemy of DESP_Owner[DESP_Spell_ID].) Equal to True)
+Rest
Then, when you get to dealing the damage, you first set a new multiplier factor to 1, then if the unit is a structure, you multiply it by the BuildingDamageFactor, then when it is an ally, you multiply it by the FriendlyFireFactor.
But that doesn't have to interest the user of this spell, so no need to downrate it because of that.
I swear I always have a hard time constructing the logic gate. I know there must be an easier way but it never comes to mind.
Even I myself think that IF blocks look horrendous!
I will try to work on it again some other time. Thanks a lot for the enlightenment, appreciate it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.