[Hero] Soul Harvester

Monsterous

In the Shadows, Lurking.
Reaction score
99
~Unit Description~
A skilled advocate in the art of Necromancy, the Soul Harvester specializes in the very being of what makes life, and utilizing it to devastate his foes, as well as augment his strength.

Primary Attribute: STR
Only has 31 mana. Cannot regenerate mana.


Spells
Soul Cache MUI?: Nopez Leakless: Should be.
"You gain the ability to harvest souls, allowing you to use your spells and to cause extra damage."

This is the first spell you can obtain, and one of the few ways to gain mana with this hero. You gain 0.1/0.15/0.2 mana per attack, but a kill gets you 1/1.5/2 mana. The damage bonus is a bonus 1 damage per 3/2/1 points of mana you currently have.

This trigger calculates the mana bonus by attacking.
Trigger:
  • Soul Cache Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Soul Harvester
      • (Level of Soul Cache for (Attacking unit)) Greater than or equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Soul Cache for (Attacking unit)) Equal to 1
        • Then - Actions
          • Wait 0.15 seconds
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing ((Mana of (Attacking unit)) / 3.00) damage of attack type Spells and damage type Normal
          • Floating Text - Create floating text that reads (String((Real((Integer(((Mana of (Attacking unit)) / 3.00))))))) at (Position of (Attacked unit)) with Z offset 5.00, using font size 7.50, color (60.00%, 75.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change (Last created floating text): Disable permanence
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Soul Cache for (Attacking unit)) Equal to 2
        • Then - Actions
          • Wait 0.15 seconds
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing ((Mana of (Attacking unit)) / 2.00) damage of attack type Spells and damage type Normal
          • Floating Text - Create floating text that reads (String((Real((Integer(((Mana of (Attacking unit)) / 2.00))))))) at (Position of (Attacked unit)) with Z offset 5.00, using font size 7.50, color (60.00%, 75.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change (Last created floating text): Disable permanence
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Soul Cache for (Attacking unit)) Equal to 3
        • Then - Actions
          • Wait 0.15 seconds
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing ((Mana of (Attacking unit)) / 1.00) damage of attack type Spells and damage type Normal
          • Floating Text - Create floating text that reads (String((Real((Integer(((Mana of (Attacking unit)) / 1.00))))))) at (Position of (Attacked unit)) with Z offset 5.00, using font size 7.50, color (60.00%, 75.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change (Last created floating text): Disable permanence
        • Else - Actions
This trigger calculates the damage bonus.
Trigger:
  • Soul Cache Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Soul Harvester
      • (Level of Soul Cache for (Attacking unit)) Greater than or equal to 1
    • Actions
      • Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + ((Real((Level of Soul Cache for (Attacking unit)))) / 10.00))
This trigger calculates the mana bonus by killing.
Trigger:
  • Soul Cache Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Killing unit)) Equal to Soul Harvester
    • Actions
      • Set SC_Unit_Point = (Position of (Dying unit))
      • Unit - Set mana of (Killing unit) to ((Mana of (Killing unit)) + (0.50 + ((Real((Level of Soul Cache for (Killing unit)))) x 0.50)))
      • Special Effect - Create a special effect at SC_Unit_Point using Abilities\Spells\Items\AIil\AIilTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at SC_Unit_Point using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_SC_Unit_Point)
Extra Notes: I was unable to think of a formulae that would suffice for the first trigger, so i have had to do seperate If/Then/Else triggers for each level of the spell.

Soul Reap MUI?: No, theres a wait ._. Leakless: Should be.
"You rip a target's inner shell, dealing damage. If the target is killed, you gain mana, and the cooldown is reset."

This spell will cause 150/200/250 damage to a single unit. If you kill a unit with this, there is no mana cost to the spell, the cooldown is reset, and you gain 1/2/3 mana.

This is the entire spell.
Trigger:
  • Soul Reap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Reap
    • Actions
      • Trigger - Turn off Soul Cache Kill <gen>
      • Set SR_Unit_Point = (Position of (Target unit of ability being cast))
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (100.00 + (50.00 x (Real((Level of Soul Reap for (Casting unit)))))) damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is alive) Equal to False
        • Then - Actions
          • Wait 0.10 seconds
          • Special Effect - Create a special effect at SR_Unit_Point using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at SR_Unit_Point using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Set mana of (Casting unit) to ((((Real((Level of Soul Reap for (Casting unit)))) x 1.00) + 5.00) + (Mana of (Casting unit)))
          • Set Reap_Level = (Level of Soul Reap for (Casting unit))
          • Unit - Remove Soul Reap from (Casting unit)
          • Hero - Modify unspent skill points of (Triggering unit): Add Reap_Level points
          • For each (Integer A) from 1 to Reap_Level, do (Actions)
            • Loop - Actions
              • Hero - Learn skill for (Triggering unit): Soul Reap
        • Else - Actions
      • Custom script: call RemoveLocation (udg_SR_Unit_Point)
      • Trigger - Turn on Soul Cache Kill <gen>


Imprison MUI?: No. Leakless: Should be.
"Surrounds an area with a skeletal barrier, teleporting you inside of it. The barrier prevents anyone escaping, or entering. The barrier will also damage enemy units inside, and gain you mana according to your Soul Cache level upon kills."

This spell blocks anything entering, or exitting. This can be used as a safe blink, or a blockade against multiple melee units, or a hero blocker. The skeletons should only attack enemy units inside the barrier.
This trigger spawns the units that attack and block.
Trigger:
  • Imprison
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Imprison
    • Actions
      • Set Imprison_Caster = (Triggering unit)
      • Set Imprison_Point = (Target point of ability being cast)
      • For each (Integer A) from 1 to 15, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Imprison Barrier Unit [Collision Dummy] for Neutral Passive at (Imprison_Point offset by 210.00 towards ((Real((Integer A))) x 24.00) degrees) facing Imprison_Point
          • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Imprison for (Casting unit)) Equal to 1
            • Then - Actions
              • Unit - Create 1 Imprison Barrier Unit [Level 1] for Player 1 (Red) at (Imprison_Point offset by 230.00 towards ((Real((Integer A))) x 24.00) degrees) facing Imprison_Point
              • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Imprison for (Casting unit)) Equal to 2
            • Then - Actions
              • Unit - Create 1 Imprison Barrier Unit [Level 2] for Player 1 (Red) at (Imprison_Point offset by 230.00 towards ((Real((Integer A))) x 24.00) degrees) facing Imprison_Point
              • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in (Units in (Region centered at Imprison_Point with size (225.00, 225.00)))) Equal to 0
                • Then - Actions
                  • Unit - Order (Last created unit) to Special - Channel
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                    • Then - Actions
                      • Unit Group - Pick every unit in (Units of type Imprison Barrier Unit [Level 2]) and do (Actions)
                        • Loop - Actions
                          • Unit - Order (Picked unit) to Attack (Random unit from (Units in (Region centered at Imprison_Point with size (225.00, 225.00)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)))
                    • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Imprison for (Casting unit)) Equal to 3
            • Then - Actions
              • Unit - Create 1 Imprison Barrier Unit [Level 3] for Player 1 (Red) at (Imprison_Point offset by 230.00 towards ((Real((Integer A))) x 24.00) degrees) facing Imprison_Point
              • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in (Units in (Region centered at Imprison_Point with size (225.00, 225.00)))) Equal to 0
                • Then - Actions
                  • Unit - Order (Last created unit) to Special - Channel
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                    • Then - Actions
                      • Unit Group - Pick every unit in (Units of type Imprison Barrier Unit [Level 3]) and do (Actions)
                        • Loop - Actions
                          • Unit - Order (Picked unit) to Attack (Random unit from (Units in (Region centered at Imprison_Point with size (225.00, 225.00)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)))
                    • Else - Actions
            • Else - Actions
      • Wait 0.15 seconds
      • Unit - Move (Triggering unit) instantly to Imprison_Point
      • Custom script: call RemoveLocation (udg_Imprison_Point)
This trigger lets the Soul Harvester gain mana from the barrier's kills.
Trigger:
  • ImprisonManagain
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Soul Cache for Imprison_Caster) Greater than or equal to 1
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Killing unit)) Equal to Imprison Barrier Unit [Level 1]
          • (Unit-type of (Killing unit)) Equal to Imprison Barrier Unit [Level 2]
          • (Unit-type of (Killing unit)) Equal to Imprison Barrier Unit [Level 3]
    • Actions
      • Unit - Set mana of Imprison_Caster to ((Mana of Imprison_Caster) + (0.50 + ((Real((Level of Soul Cache for Imprison_Caster))) x 0.50)))

Extra Notes: I was unable to have a unit with locust block, so i created a locust visible unit that attacks, and an invisible unit that blocks. Due to this, i cannot create a perfect circle of the locust units, but the invisible units do create a circle.
Ultimate: Soul Discharge MUI?: No. Leakless: Should be.
"Unleashes a huge ball of souls in a direction, exploding with tremendous force upon impact. Splinters with smaller souls, dealing a smaller amount of damage towards enemies."

When the "main ball" is created, smaller balls will splinter off, detonating when it either hits a unit or expires after a small period of time.

This trigger creates the main ball, and activates the other triggers.
Trigger:
  • Soul Discharge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Discharge
    • Actions
      • Set SD_Casted_Point = (Target point of ability being cast)
      • Set SD_Caster = (Triggering unit)
      • Unit - Create 1 Soul Discharge Main for (Owner of (Triggering unit)) at ((Position of (Casting unit)) offset by 60.00 towards (Facing of (Casting unit)) degrees) facing (Facing of (Casting unit)) degrees
      • Set SD_Main = (Last created unit)
      • Unit - Order (Last created unit) to Move To SD_Casted_Point
      • Trigger - Run Discharge Creation <gen> (checking conditions)
      • Trigger - Turn on Discharge Explosion <gen>
      • Trigger - Turn on Main Explosion <gen>
This trigger creates the smaller balls.
Trigger:
  • Discharge Creation
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 16, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SD_Main is alive) Equal to True
            • Then - Actions
              • Set SD_Main_Position[1] = (Position of SD_Main)
              • Unit - Create 1 Soul Discharge Created for (Owner of SD_Caster) at (SD_Main_Position[1] offset by 15.00 towards (30.00 + (Facing of SD_Main)) degrees) facing (SD_Main_Position[1] offset by 0.00 towards (30.00 + (Facing of SD_Main)) degrees)
              • Set SD_Discharge_Left_Position[(Integer A)] = (Position of (Last created unit))
              • Unit - Order (Last created unit) to Move To (SD_Discharge_Left_Position[(Integer A)] offset by 350.00 towards (30.00 + (Facing of SD_Main)) degrees)
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
              • Set SD_Discharge_Array_Left[(Integer A)] = (Last created unit)
              • Custom script: call RemoveLocation (udg_SD_Main_Position[1])
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SD_Main is alive) Equal to True
            • Then - Actions
              • Set SD_Main_Position[1] = (Position of SD_Main)
              • Unit - Create 1 Soul Discharge Created for (Owner of SD_Caster) at (SD_Main_Position[1] offset by 15.00 towards (-30.00 + (Facing of SD_Main)) degrees) facing (SD_Main_Position[1] offset by 0.00 towards (-30.00 + (Facing of SD_Main)) degrees)
              • Set SD_Discharge_Right_Position[(Integer A)] = (Position of (Last created unit))
              • Unit - Order (Last created unit) to Move To (SD_Discharge_Right_Position[(Integer A)] offset by 350.00 towards (-30.00 + (Facing of SD_Main)) degrees)
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
              • Set SD_Discharge_Array_Right[(Integer A)] = (Last created unit)
              • Custom script: call RemoveLocation (udg_SD_Main_Position[1])
            • Else - Actions
          • Wait 0.10 seconds
This detonates the small balls when they come into contact with an enemy unit.
Trigger:
  • Discharge Explosion
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer B) from 1 to 16, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 125.00 of SD_Discharge_Left_Position[(Integer B)]) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in (Units within 125.00 of SD_Discharge_Left_Position[(Integer B)] matching (((Matching unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True))) Greater than or equal to 1
                • Then - Actions
                  • Unit Group - Pick every unit in (Units within 125.00 of SD_Discharge_Left_Position[(Integer B)]) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True
                          • ((Picked unit) is alive) Equal to True
                        • Then - Actions
                          • Unit - Remove SD_Discharge_Array_Left[(Integer B)] from the game
                          • Unit - Cause SD_Caster to damage (Picked unit), dealing 100.00 damage of attack type Chaos and damage type Normal
                          • Special Effect - Create a special effect at SD_Discharge_Left_Position[(Integer B)] using Abilities\Spells\Other\Silence\SilenceAreaBirth.mdl
                          • Set SD_Special_Effects[(Integer B)] = (Last created special effect)
                          • Custom script: call RemoveLocation (udg_SD_Discharge_Left_Position[bj_forLoopBIndex])
                        • Else - Actions
                • Else - Actions
      • For each (Integer B) from 1 to 16, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 125.00 of SD_Discharge_Right_Position[(Integer B)]) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in (Units within 125.00 of SD_Discharge_Right_Position[(Integer B)] matching (((Matching unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True))) Greater than or equal to 1
                • Then - Actions
                  • Unit Group - Pick every unit in (Units within 125.00 of SD_Discharge_Right_Position[(Integer B)]) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True
                          • ((Picked unit) is alive) Equal to True
                        • Then - Actions
                          • Unit - Remove SD_Discharge_Array_Right[(Integer B)] from the game
                          • Unit - Cause SD_Caster to damage (Picked unit), dealing 100.00 damage of attack type Chaos and damage type Normal
                          • Special Effect - Create a special effect at SD_Discharge_Right_Position[(Integer B)] using Abilities\Spells\Other\Silence\SilenceAreaBirth.mdl
                          • Set SD_Special_Effects[(16 + (Integer B))] = (Last created special effect)
                          • Custom script: call RemoveLocation (udg_SD_Discharge_Right_Position[bj_forLoopBIndex])
                        • Else - Actions
                • Else - Actions
This trigger detonates the small balls when their life expires.
Trigger:
  • Discharge Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Soul Discharge Created
    • Actions
      • Set SD_Discharge_Expire_Point = (Position of (Triggering unit))
      • Unit Group - Pick every unit in (Units within 125.00 of SD_Discharge_Expire_Point) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units within 125.00 of SD_Discharge_Expire_Point matching (((Matching unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True))) Greater than or equal to 1
            • Then - Actions
              • Unit Group - Pick every unit in (Units within 125.00 of SD_Discharge_Expire_Point) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True
                      • ((Picked unit) is alive) Equal to True
                    • Then - Actions
                      • Unit - Remove (Triggering unit) from the game
                      • Unit - Cause SD_Caster to damage (Picked unit), dealing 100.00 damage of attack type Chaos and damage type Normal
                      • Special Effect - Create a special effect at SD_Discharge_Expire_Point using Abilities\Spells\Other\Silence\SilenceAreaBirth.mdl
                      • Wait 0.10 seconds
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                      • Unit - Remove (Triggering unit) from the game
                      • Special Effect - Create a special effect at SD_Discharge_Expire_Point using Abilities\Spells\Other\Silence\SilenceAreaBirth.mdl
                      • Wait 0.10 seconds
                      • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Unit - Remove (Triggering unit) from the game
              • Special Effect - Create a special effect at SD_Discharge_Expire_Point using Abilities\Spells\Other\Silence\SilenceAreaBirth.mdl
              • Wait 0.10 seconds
              • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_SD_Discharge_Expire_Point)
This trigger detects and detonates the main ball when it reaches the target point.
Trigger:
  • Main Explosion
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set SD_Main_Position[2] = (Position of SD_Main)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between SD_Main_Position[2] and SD_Casted_Point) Less than or equal to 20.00
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 300.00 of SD_Main_Position[2]) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of SD_Caster)) Equal to True
                • Then - Actions
                  • Unit - Cause SD_Caster to damage (Picked unit), dealing 500.00 damage of attack type Chaos and damage type Normal
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCaster.mdl
                  • Set SD_Special_Effects[33] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
                  • Set SD_Special_Effects[34] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Units\NightElf\Wisp\WispExplode.mdl
                  • Set SD_Special_Effects[35] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Other\Charm\CharmTarget.mdl
                  • Set SD_Special_Effects[36] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                  • Set SD_Special_Effects[37] = (Last created special effect)
                  • Unit - Remove SD_Main from the game
                  • Trigger - Turn on Stop Explosion <gen>
                  • Trigger - Clear the trigger queue
                  • Trigger - Turn off (This trigger)
                  • Custom script: call RemoveLocation (udg_SD_Main_Position[2])
                • Else - Actions
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCaster.mdl
                  • Set SD_Special_Effects[33] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
                  • Set SD_Special_Effects[34] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Units\NightElf\Wisp\WispExplode.mdl
                  • Set SD_Special_Effects[35] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Other\Charm\CharmTarget.mdl
                  • Set SD_Special_Effects[36] = (Last created special effect)
                  • Special Effect - Create a special effect at SD_Main_Position[2] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                  • Set SD_Special_Effects[37] = (Last created special effect)
                  • Unit - Remove SD_Main from the game
                  • Trigger - Turn on Stop Explosion <gen>
                  • Trigger - Clear the trigger queue
                  • Trigger - Turn off (This trigger)
                  • Custom script: call RemoveLocation (udg_SD_Main_Position[2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units within 300.00 of SD_Main_Position[2])) Equal to 0
            • Then - Actions
              • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCaster.mdl
              • Set SD_Special_Effects[33] = (Last created special effect)
              • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
              • Set SD_Special_Effects[34] = (Last created special effect)
              • Special Effect - Create a special effect at SD_Main_Position[2] using Units\NightElf\Wisp\WispExplode.mdl
              • Set SD_Special_Effects[35] = (Last created special effect)
              • Special Effect - Create a special effect at SD_Main_Position[2] using Abilities\Spells\Other\Charm\CharmTarget.mdl
              • Set SD_Special_Effects[36] = (Last created special effect)
              • Special Effect - Create a special effect at SD_Main_Position[2] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
              • Set SD_Special_Effects[37] = (Last created special effect)
              • Unit - Remove SD_Main from the game
              • Trigger - Turn on Stop Explosion <gen>
              • Trigger - Clear the trigger queue
              • Trigger - Turn off (This trigger)
              • Custom script: call RemoveLocation (udg_SD_Main_Position[2])
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation (udg_SD_Main_Position[2])
This trigger cleans up, and turns off triggers.
Trigger:
  • Stop Explosion
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (Number of units in (Units owned by (Owner of SD_Caster) of type Soul Discharge Created)) Equal to 0
    • Actions
      • Trigger - Turn off Discharge Explosion <gen>
      • Custom script: call RemoveLocation (udg_SD_Casted_Point)
      • For each (Integer A) from 1 to 40, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy SD_Special_Effects[(Integer A)]
      • Trigger - Turn off (This trigger)

Extra Notes: This spell can give mana to the Soul Harvester by killing.

Other Notes: The hero cannot regain mana, due to this trigger replicating it's own mana regeneration.
Trigger:
  • Mana Depletion
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Set mana of Soul_Harvester to ((Mana of Soul_Harvester) - (0.00 + (0.05 x (Real((Intelligence of Soul_Harvester (Exclude bonuses)))))))
Due to this, the hero has 31 mana, as the hero cannot maintain the peak amount of mana as this trigger would detuct mana away, thus keeping at 30 mostly.


Thank you for browsing, reading, criticising, flaming, roaring, shouting, typing, looking etc etc... at or on this thread, i hope you enjoyed and liked it, and i hope you provide criticisms as to how to improve this! I also hope that the spells are leakless, and that i can improve them to make them become MUI :D
One favor however, if you could help me replace the names of the spells, as 3 of 4 of them have "soul" in them. >.<

~Goodday! :3~
 

Attachments

  • Soul Harvester.w3x
    32.7 KB · Views: 301

Komaqtion

You can change this now in User CP.
Reaction score
469
First, please change all of your codes to use [noparse]
Trigger:
[/noparse] tags instead, as they're alot easier to read from :D

But, just by having a quick glanse at your very first trigger there, I can tell you that it isn't either MUI nor leakless...
But once you've edited it with
Trigger:
  • tags, then I&#039;ll have a better look <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Well im not an expert with the art of MUI, and i tried to eliminate as many leaks as i could find ._.
Also changed the tags to wc3; didn't know such a tag existed :D
 

Laiev

Hey Listen!!
Reaction score
188
I don't like much the first spell, you use much "unit is attacked"

use some damage detect system, gui damage detect system by Weep is a good choice to gui
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, for the first one, use GDD is a good choice (As Laiev said ;))

Then you just change the event to "Game - GDD_Event becomes Equal to 0.00", and all Triggering unit (The damage-taking unit) to "GDD_DamagedUnit", all Damage source (The damaging unit) to "GDD_DamageSource" and the damage taken to "GDD_Damage".

And, why is that wait there ?
Just remove it, and it'll be MUI :D
And you can also merge all of those "If"s and then you'll need to remove the leaks from those actions too :D

So I suggest you change the trigger to look like this:
Trigger:
  • Soul Cache Damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Unit-type of GDD_DamageSource) Equal to Soul Harvester
      • (Level of Soul Cache for GDD_DamageSource) Greater than or equal to 1
    • Actions
    • Set TempPoint = (Position of GDD_DamagedUnit)
    • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing ((Mana of (Attacking unit)) / (Real(4 - ((Level of Soul Cache for GDD_DamageSource))))) damage of attack type Spells and damage type Normal
    • Floating Text - Create floating text that reads (String((Real((Integer(((Mana of (Attacking unit)) / (Real(4 - ((Level of Soul Cache for GDD_DamageSource))))))))))) at TempPoint with Z offset 5.00, using font size 7.50, color (60.00%, 75.00%, 100.00%), and 0.00% transparency
    • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
    • Floating Text - Change (Last created floating text): Disable permanence


This is all freehanded, but it should work :D
Use the same event and variables for the second trigger ;)
The third trigger is good :D

Fourth trigger is leakless, but not MUI...
Again, why a small wait there ?!

Fifth trigger leaks quite a bit...
You first leak is a combination of a unit-group and a region...
Code:
(Number of units in [COLOR="Red"](Units in (Region centered at Imprison_Point with size (225.00, 225.00))))[/COLOR] Equal to 0
There is absolutely no need for the region there, why not just use this:
Trigger:
  • (Number of units in (Units within 225.00 of Imprison_Point)) Equal to 0


Though, this still leaks so you need to put that unit group there in a variable, and then use [ljass]call DestroyGroup(udg_<variable name>)[/ljass] in a custom script to remove the leak ;)
Trigger:
  • Unit Group - Pick every unit in (Units of type Imprison Barrier Unit [Level 2]) and do (Actions)


Same kind of leak there ;)

And yet again, why that last wait there ?!
That's the only thing which makes it non-MUI...

Sixth trigger is ok :D

Seventh trigger leaks here:
Code:
Unit - Create 1 Soul Discharge Main for (Owner of (Triggering unit)) at [COLOR="Blue"]([COLOR="Red"](Position of (Casting unit))[/COLOR] offset by 60.00 towards (Facing of (Casting unit)) degrees)[/COLOR] facing (Facing of (Casting unit)) degrees

There is actually two leaks there, first you need to set "(Position of (Casting unit))" to a variable, then the offset to a variable too (Not the same variable...) and then detroy both of them ;)

Code:
Unit - Create 1 Soul Discharge Created for (Owner of SD_Caster) at [COLOR="Red"](SD_Main_Position[1] offset by 15.00 towards (30.00 + (Facing of SD_Main)) degrees)[/COLOR] facing [COLOR="red"](SD_Main_Position[1] offset by 0.00 towards (30.00 + (Facing of SD_Main)) degrees)[/COLOR]

Two leaks there too !
And same in the second "If" there...
And you should never use wait inside a loop !
Use a timer, and another trigger for this (Sorry, I don't have time to go into detail in this, but hopefully someone else'll explain it to you :D And you'll probably have to use Hashtables to make that work fully MUI, here's a small tutorial: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/)

Eighth trigger contains 6 unit-group leaks...
Use the same method as before (A couple of line above...) to remove them ;)

Ninth trigger, yet again 3 unit-group leaks...
Also isn't the least amount MUI, and hashtables is a good solution here too :D

Tenth trigger, two unit-group leaks here too...
(Getting kinda tired of the, actually !)

Eleventh trigger, another unit-group leak :(

Finally it's over (For me at least :p) !
I haven't actually tried these spells out, but they should actually lag QUITE A LOT, at least after a couple of casts...
Please clear all of those leaks :D
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
I thank you for your code reading, and i actually completely forgot about unit group leaks ^^


"And, why is that wait there ?"
I found that if there was no wait ,then the hero could multiply click on different units without actually attacking, causing him to activate the trigger without attacking.
"Again, why a small wait there ?!"
I put a wait there as the hero would not gain mana correctly. If there was no wait, the trigger would play, allowing him to have full mana, but then he would lose 5 mana from his spell. The wait nullifies this.

Also, i thank you for the formula to remove all those if/then/elses, i couldnt think of a way ^^

~Laiev
Thanks for indicating to me that theres a system for that, ill add it in :3

EDIT: My bad; didn't put in the position of GDD_DamagedUnit as a variable xD
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I found that if there was no wait ,then the hero could multiply click on different units without actually attacking, causing him to activate the trigger without attacking.

That's why you should use a damage detection system ;)
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Trigger:
  • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing ((Mana of (Attacking unit)) / (4.00 - (Real((Level of Soul Cache for GDD_DamageSource))))) damage of attack type Spells and damage type Normal


Ive managed to isolate the root of the problem, and i have no clue how to fix it xD
It seems correct to me, but perhaps anyone wandering by could tell me what the problem is quite obviously ._.

Edit: After further investigation, any number inputted will result in a crash into this trigger, so im at a loss D:
When i delete this trigger, the floating text works fine, its just the damage bonus on the targeted unit wont come into effect.
Double Edit: The trigger will not accept the GDD_DamageSource, or my own variable Soul_Harvester to be the damage causer. The damage causer can be GDD_DamagedUnit, but then it would not activate the trigger Soul Cache Kill sometimes.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top