• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] Create a Spell ( Malzahar "E" Malefic Visions )

Level 11
Joined
Sep 30, 2017
Messages
169
I'm working on a hero for my project. The hero has the same spell as Malzahar's Malefic Visions from League of Legends. It infects the target enemy's mind, dealing magic damage over 7 seconds. If the target dies while infected, they spread Mind Leech (the name of the ability) onto the closest nearby enemy. For each unit killed under this effect, the Hero will gain 75 mana.

Yes, I have created this spell, but it feels wonky to me. Like, it works 75% of the time. Sometimes it spreads, sometimes not. I'm not the best when it comes to triggers, so can someone check? Maybe I'm doing something wrong.

This Hero Is Called Syndra By the way, Sometrigger refers to her, as she is the hero who uses it.



  • Mind Leech Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mind Leech
    • Actions
      • Set MindLeech_Caster = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Syndra
        • Then - Actions
          • Set MindLeech_SyndraMana = (Casting unit)
        • Else - Actions
          • Do nothing
      • Set MindLeech_Level = (Level of Mind Leech for MindLeech_Caster)
      • Set MindLeech_Target = (Target unit of ability being cast)
      • Unit - Add MindLeech (Passive) to MindLeech_Target
      • Set MindLeech_SpreadCount = (MindLeech_SpreadCount + 1)

  • Mind Leech
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of MindLeech (Passive) for (Dying unit)) Greater than or equal to 1
    • Actions
      • Set MindLeech_Target = (Dying unit)
      • Set MindLeech_Target_Point = (Position of (Dying unit))
      • Set MindLeech_Group = (Units within 300.00 of MindLeech_Target_Point matching ((((Matching unit) belongs to an ally of (Owner of MindLeech_Target)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False))))
      • Unit - Set mana of MindLeech_SyndraMana to ((Mana of MindLeech_SyndraMana) + 75.00)
      • Special Effect - Create a special effect attached to the origin of MindLeech_SyndraMana using Abilities\Spells\Items\AIre\AIreTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in MindLeech_Group) Greater than or equal to 1
        • Then - Actions
          • Unit - Remove MindLeech (Passive) from (Dying unit)
          • Unit - Create 1 Dummy for Neutral Extra at MindLeech_Target_Point facing (Position of (Picked unit))
          • Unit - Add Mind Leech to (Last created unit)
          • Unit - Set level of Mind Leech for (Last created unit) to MindLeech_Level
          • Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation (Random unit from MindLeech_Group)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Else - Actions
          • Do nothing
      • Custom script: call DestroyGroup(udg_MindLeech_Group)
      • Custom script: call RemoveLocation(udg_MindLeech_Target_Point)

  • Mind Leech Buff Remove
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Mind Leech ) Equal to False
            • Then - Actions
              • Unit - Remove MindLeech (Passive) from (Picked unit)
            • Else - Actions
              • Do nothing
 
remove the trigger Mind Leech Buff Remove, i think this will work for you but it is just a quick edit of your trigger

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Mind Leech
  • Actions
    • Set MindLeech_TempUnit = (Target unit of ability being cast)
    • Set MindLeech_Index = (Custom value of MindLeech_TempUnit)
    • Unit - Add MindLeech (Passive) to MindLeech_TempUnit
    • Set MindLeech_Caster[MindLeech_Index] = (Casting unit)
    • Set MindLeech_Level[MindLeech_Index] = (Level of Mind Leech for (Casting unit))
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Level of MindLeech (Passive) for (Dying unit)) Greater than or equal to 1
  • Actions
    • Set MindLeech_Index = (Custom value of (Dying unit))
    • Set MindLeech_TempUnit = MindLeech_Caster[MindLeech_Index]
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • MindLeech_TempUnit Equal to No unit
      • Then - Actions
        • Skip remaining actions
      • Else - Actions
    • Unit - Set mana of MindLeech_TempUnit to ((Mana of MindLeech_TempUnit) + 75.00)
    • Special Effect - Create a special effect attached to the origin of MindLeech_TempUnit using Abilities\Spells\Items\AIre\AIreTarget.mdl
    • Special Effect - Destroy (Last created special effect)
    • Set MindLeech_TempPoint = (Position of (Dying unit))
    • Set MindLeech_TempGroup = (Units within 300.00 of MindLeech_TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and (((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of units in MindLeech_TempGroup) Greater than or equal to 1
      • Then - Actions
        • Unit - Create 1 Dummy for Neutral Extra at MindLeech_TempPoint facing 0.00
        • Unit - Add Mind Leech to (Last created unit)
        • Unit - Set level of Mind Leech for (Last created unit) to MindLeech_Level[MindLeech_Index]
        • Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation (Random unit from MindLeech_Group)
        • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Else - Actions
    • Set MindLeech_Caster[MindLeech_Index] = No unit
    • Set MindLeech_Level[MindLeech_Index] = 0
    • Custom script: call DestroyGroup(udg_MindLeech_TempGroup)
    • Custom script: call RemoveLocation(udg_MindLeech_TempPoint)
 
Last edited:
Back
Top