• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Purge of Nature

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This spell is made for the Spells & Systems Mini-Contest #16.
The spell should be leakless and of course MUI.
_____________________________________________________
Purge of Nature
In order to purge the earth and the nature, the druid creates an organic being which spews the impurities out of earth. If an enemied unit is hit by these noxious substances, it will receive damage over time and gets a lowered armour as well as a slower movement and attackspeed. There is a chance of 20% to spawn a corrupted treant if the venom hits a tree. After cleaning the earth, the ground is free from toxin and every allied unit in 400 AoE of the area receives an improved regeneration of the hitpoints for 25 seconds.
The disgorging lasts 5/10/15 seconds.

Changelog:
11-11-2008---Updated, improved efficiency, removed two leaks, added a new effect.
11-12-2008---Added a (preventable) 'remove blight' effect.


Keywords:
Nature, Venom, Toxin, Earth, Green, Treant, Druid,
Contents

Purge of Nature (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 2 Dec 2011 Bribe: Acid Rain destroys bridges. The conditions also leak unit groups.

Moderator

M

Moderator

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

2 Dec 2011
Bribe: Acid Rain destroys bridges. The conditions also leak unit groups.
 
Level 14
Joined
Jan 15, 2007
Messages
349
Good job. The visual effects are really good. The triggering is ok and the spell seem to be MUI. Also the tooltip fit the spell. Well done so far, but I found two leaks and also it's not really effective to have the trigger "Acid Rain" all the time on. And please add some more documentation for example how to import the spell.

Possible Ways to fix your flaws:


The first leak I found was in the trigger "Acid Rain". It seems you forgot that the action "(Random unit from (Units within 125.00 of AR_TempPoint matching [...]" create a group. There is the possible way how to fix it:
  • Acid Rain
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Number of units in (Units of type DummyAR)) Greater than 0
          • (Number of units in (Units of type DummyARVenom)) Greater than 0
    • Actions
      • Set AR_DummyGroup = (Units of type DummyAR)
      • Unit Group - Pick every unit in AR_DummyGroup and do (Actions)
        • Loop - Actions
          • Set AR_TempPoint = (Position of (Picked unit))
          • Set AR_TargetPoint = (AR_TempPoint offset by (Random real number between 25.00 and 600.00) towards (Random angle) degrees)
          • Unit - Order (Picked unit) to Neutral Tinker - Pocket Factory AR_TargetPoint
          • Custom script: call RemoveLocation (udg_AR_TargetPoint)
          • Custom script: call RemoveLocation (udg_AR_TempPoint)
      • Custom script: call DestroyGroup (udg_AR_DummyGroup)
      • Set AR_DummyGroup = (Units of type DummyARVenom)
      • Unit Group - Pick every unit in AR_DummyGroup and do (Actions)
        • Loop - Actions
          • Set AR_TempPoint = (Position of (Picked unit))
          • Custom script: set bj_wantDestroyGroup=true
          • Set AR_TargetUnit = (Random unit from (Units within 125.00 of AR_TempPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enem
          • Unit - Order (Picked unit) to Neutral Alchemist - Acid Bomb AR_TargetUnit
          • Set AR_TargetUnit = No unit
          • Destructible - Pick every destructible within 150.00 of AR_TempPoint and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current life of (Picked destructible)) Not equal to 0.00
                  • (Random integer number between 1 and 5) Equal to 1
                • Then - Actions
                  • Set AR_TargetPoint = (Position of (Picked destructible))
                  • Destructible - Remove (Picked destructible)
                  • Special Effect - Create a special effect at AR_TargetPoint using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Create 1 DummySpawnTreant for (Owner of (Picked unit)) at AR_TargetPoint facing Default building facing degrees
                  • Unit - Order (Last created unit) to Human Archmage - Summon Water Elemental
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Unit - Make (Last created unit) Explode on death
                  • Custom script: call RemoveLocation (udg_AR_TargetPoint)
                • Else - Actions
                  • Destructible - Kill (Picked destructible)
          • Custom script: call RemoveLocation (udg_AR_TempPoint)
      • Custom script: call DestroyGroup (udg_AR_DummyGroup)
The second leak I found is in the Map Initialization, in the trigger "VisibilityTimeRespawnStart". I know it won't leak that much but I just want the best demo map quality. Ok there is the possible way how to fix:
  • VisibilityTimeRespawnStart
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 2 (Blue)) and do (Actions)
        • Loop - Actions
          • Set Temp_Integer = (Temp_Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Temp_Integer
          • Set Creep_Point[Temp_Integer] = (Position of (Picked unit))
      • Melee Game - Use melee time of day (for all players)
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Quest - Display to (All players) the Quest Update message: This spell is made ...

How I said it is not very effective to have a periodic trigger that is active all the time. You have to make a activation trigger and add in the trigger RemoveDummy some new lines of actions. Also you need to create a integer variable with the name "AR_Size". Ok after you done that create a new trigger with the name "Acid Release". The trigger should look then like this:
  • Acid Release
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Purge of Nature
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AR_Size Equal to 0
        • Then - Actions
          • Trigger - Turn on Acid Rain <gen>
        • Else - Actions
      • Set AR_Size = (AR_Size + 1)
When you finished with that add some lines of actions to the "RemoveDummy"
trigger like here:
  • RemoveDummy
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) is in (Units of type DummyARVenom)) Equal to True
          • ((Triggering unit) is in (Units of type DummyAR)) Equal to True
          • ((Triggering unit) is in (Units of type Acid Rain)) Equal to True
          • ((Triggering unit) is in (Units of type Acid Rain)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in (Units of type Acid Rain)) Equal to True
        • Then - Actions
          • Set AR_Size = (AR_Size - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AR_Size Equal to 0
            • Then - Actions
              • Trigger - Turn off Acid Rain <gen>
            • Else - Actions
          • Set AR_TempPoint = (Position of (Triggering unit))
          • Special Effect - Create a special effect at AR_TempPoint using Objects\Spawnmodels\NightElf\NEDeathMedium\NEDeath.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 DummySpawnTreant for (Owner of (Triggering unit)) at AR_TempPoint facing Default building facing degrees
          • Unit - Add Purge of Nature (Aura) to (Last created unit)
          • Unit - Add a 25.00 second Generic expiration timer to (Last created unit)
          • Unit - Make (Last created unit) Explode on death
          • Custom script: call RemoveLocation (udg_AR_TempPoint)
        • Else - Actions
      • Unit - Remove (Triggering unit) from the game


I hope that helped you. After you fixed this Im going to approve this spell.
 
Level 6
Joined
Feb 18, 2010
Messages
153
ok its a awesome abillity but it dont work for me

i copied and pasted every unit buff and abillity adn trigger in my map and it doesnt spawn and work like it does on this map
 
Level 9
Joined
Sep 5, 2015
Messages
369
for some reason when ever this is casted massive lags occur if the camera is at the point which the ability is casted. any idea as to why?
earthquake does this for some reason too. think its just the hardcoding of the game like certain abilities are built like rocks and if they try to bend they crack/explode (metaphorically speaking) lmao
 
Top