Spell Maledict

Flare

Stops copies me!
Reaction score
662
Finally got my Maledict spell completed (huge thanks to baka-ranger for finding the problem, and taking the time to fix it for me)

GUI/JASS? GUI
MUI: Yes, up to 1000 units can be targetted, and the effect can be stacked multiple times on the same unit.
Lagless: Only one special effect per unit, no fast-firing periodics so I can't imagine any lag at all.

Screenies:

Import Instructions:
Code:
-Copy the Maledict ability in the Object Editor
-Copy the Dummy unit
-In File -> Preferences, make sure that Automatically create unknown variables is checked
-Copy the Maledict cast, Maledict effect copy (this one is important, do NOT copy the original Maledict effect) and Maledict Damage Detection triggers into your Trigger Editor
-Add the ability to a hero, and have fun.

Tooltip:
Targets an area with an ancient voodoo curse. Cursed heroes will not only take damage over time, but they will be dealt bonus damage every 4 seconds based on how much HP they lost since the beginning of the curse. Lasts 12 seconds.

Code:
Trigger:
  • Maledict Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Maledict
    • Actions
      • Set TargetPt = (Target point of ability being cast)
      • Set TargetGroup = (Units within 200.00 of TargetPt matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
      • Unit Group - Pick every unit in TargetGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CustomVal Less than 1000
            • Then - Actions
              • Set CustomVal = (CustomVal + 1)
            • Else - Actions
              • Set CustomVal = 1
          • Set Caster[CustomVal] = (Triggering unit)
          • Set RandomPt = (Random point in (Playable map area))
          • Unit - Create 1 Hidden Dummy for (Owner of (Triggering unit)) at RandomPt facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to CustomVal
          • Set Dummy[CustomVal] = (Last created unit)
          • Unit Group - Add Dummy[CustomVal] to DummyGroup
          • Set Target[CustomVal] = (Picked unit)
          • Unit Group - Add Target[CustomVal] to DamageGroup
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\SpiritLink\SpiritLinkTarget.mdl
          • Set MaxDuration[CustomVal] = 12.00
          • Set SFX[CustomVal] = (Last created special effect)
          • Set DPS[CustomVal] = (5.00 x (Real((Level of Maledict for Caster[CustomVal]))))
          • Set PeriodicDamage[CustomVal] = (10.00 x (Real((Level of Maledict for Caster[CustomVal]))))
          • Trigger - Add to Maledict Damage detection <gen> the event (Unit - Target[CustomVal] Takes damage)
          • Custom script: call RemoveLocation (udg_RandomPt)
      • Custom script: call DestroyGroup (udg_TargetGroup)
    • --------------------------------------------------------------
    • Maledict Effect
      • Events
        • Time - Every 1.00 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in DummyGroup and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Or - Any (Conditions) are true
                  • Conditions
                    • CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Less than or equal to MaxDuration[(Custom value of Dummy[(Custom value of (Picked unit))])]
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Target[(Custom value of Dummy[(Custom value of (Picked unit))])] is alive) Equal to True
                  • Then - Actions
                    • Set CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] = (CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] + 1.00)
                    • Unit - Cause Dummy[(Custom value of Dummy[(Custom value of (Picked unit))])] to damage Target[(Custom value of Dummy[(Custom value of (Picked unit))])], dealing DPS[(Custom value of Dummy[(Custom value of (Picked unit))])] damage of attack type Chaos and damage type Acid
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Or - Any (Conditions) are true
                          • Conditions
                            • CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Equal to 4.00
                            • CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Equal to 8.00
                            • CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Equal to 12.00
                      • Then - Actions
                        • Set Multiplier[(Custom value of Dummy[(Custom value of (Picked unit))])] = ((Integer(DamageTaken[(Custom value of Dummy[(Custom value of (Picked unit))])])) / 100)
                        • Set MultiplierDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] = (PeriodicDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] x (Real(Multiplier[(Custom value of Dummy[(Custom value of (Picked unit))])])))
                        • Unit - Cause Dummy[(Custom value of (Picked unit))] to damage Target[(Custom value of Dummy[(Custom value of (Picked unit))])], dealing MultiplierDamage[(Custom value of Dummy[(Custom value of (Picked 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
                            • MultiplierDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] Greater than 0.00
                          • Then - Actions
                            • Floating Text - Create floating text that reads ((|cffffcc00 + ((String((Integer(MultiplierDamage[(Custom value of Dummy[(Custom value of (Picked unit))])])))) + !)) + |r) above Target[(Custom value of (Picked unit))] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                            • Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 90.00 degrees
                            • Floating Text - Change (Last created floating text): Disable permanence
                            • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                            • Floating Text - Change the fading age of (Last created floating text) to 2.25 seconds
                          • Else - Actions
                      • Else - Actions
                  • Else - Actions
                    • Set CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] = 0.00
                    • Set DamageTaken[(Custom value of Dummy[(Custom value of (Picked unit))])] = 0.00
                    • Special Effect - Destroy SFX[(Custom value of Dummy[(Custom value of (Picked unit))])]
                    • Set Target[(Custom value of Dummy[(Custom value of (Picked unit))])] = No unit
                    • Unit Group - Remove Dummy[(Custom value of (Picked unit))] from DummyGroup
                    • Unit - Remove Dummy[(Custom value of (Picked unit))] from the game
                    • Unit Group - Remove Target[(Custom value of Dummy[(Custom value of (Picked unit))])] from TargetGroup
              • Else - Actions
                • Set CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] = 0.00
                • Set DamageTaken[(Custom value of Dummy[(Custom value of (Picked unit))])] = 0.00
                • Special Effect - Destroy SFX[(Custom value of Dummy[(Custom value of (Picked unit))])]
                • Set Target[(Custom value of Dummy[(Custom value of (Picked unit))])] = No unit
                • Unit Group - Remove Dummy[(Custom value of (Picked unit))] from DummyGroup
                • Unit - Remove Dummy[(Custom value of (Picked unit))] from the game
                • Unit Group - Remove Target[(Custom value of Dummy[(Custom value of (Picked unit))])] from TargetGroup
    • --------------------------------------------------
    • Maledict Damage detection
      • Events
      • Conditions
      • Actions
        • Unit Group - Pick every unit in DummyGroup and do (Actions)
          • Loop - Actions
            • Set RandomPt = (Random point in (Playable map area))
            • Unit - Create 1 Hidden Dummy for (Owner of (Picked unit)) at RandomPt facing Default building facing degrees
            • Unit - Set the custom value of (Last created unit) to (Custom value of (Picked unit))
            • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Target[(Custom value of (Last created unit))] Equal to (Triggering unit)
              • Then - Actions
                • Set DamageTaken[(Custom value of (Last created unit))] = (DamageTaken[(Custom value of (Last created unit))] + (Damage taken))
              • Else - Actions


Credits: If you intend on using this spell in your map, please give credits to me (and Baka-Ranger, if he wants to be creditted, due to the fact that this spell wouldn't even work if he didn't fix it up)

Bugs, Suggestions etc: If you find a bug, or have any suggestion (whether it's an original idea, or just something that was recently changed in this spell's workings in DotA), please post it.


Code:
Updates:
Update 1 - Fixed some leaks (thanks to Tinki3 for pointing them out)

Update 2 - Added a screenshot, fixed the DPS
 

Attachments

  • Maledict submission few fixes.w3x
    23.5 KB · Views: 794
Code:
Maledict Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Maledict 
    Actions
        Set TargetPt = (Target point of ability being cast)
        Set TargetGroup = (Units within 200.00 of TargetPt matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
        Unit Group - Pick every unit in TargetGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        CustomVal Less than 1000
                    Then - Actions
                        Set CustomVal = (CustomVal + 1)
                    Else - Actions
                        Set CustomVal = 1
                Set Caster[CustomVal] = (Triggering unit)
                Set RandomPt = (Random point in (Playable map area))
                Unit - Create 1 Hidden Dummy for (Owner of (Triggering unit)) at RandomPt facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to CustomVal
                Set Dummy[CustomVal] = (Last created unit)
                Unit Group - Add Dummy[CustomVal] to DummyGroup
                Set Target[CustomVal] = (Picked unit)
                Unit Group - Add Target[CustomVal] to DamageGroup
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\SpiritLink\SpiritLinkTarget.mdl
                Set MaxDuration[CustomVal] = 12.00
                Set SFX[CustomVal] = (Last created special effect)
                [b]Set DPS[CustomVal] = (5.00 x (Real((Level of Maledict  for Caster[CustomVal]))))[/b]
                Set PeriodicDamage[CustomVal] = (10.00 x (Real((Level of Maledict  for Caster[CustomVal]))))
                Trigger - Add to Maledict Damage detection <gen> the event (Unit - Target[CustomVal] Takes damage)
                Custom script:   call RemoveLocation (udg_RandomPt)
        Custom script:   call DestroyGroup (udg_TargetGroup)


--------------------------------------------------------------

Maledict Effect Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in DummyGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Less than or equal to MaxDuration[(Custom value of Dummy[(Custom value of (Picked unit))])]
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Target[(Custom value of Dummy[(Custom value of (Picked unit))])] is alive) Equal to True
                            Then - Actions
                                Set CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] = (CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] + 1.00)
                                [b]Unit - Cause Dummy[(Custom value of Dummy[(Custom value of (Picked unit))])] to damage Target[(Custom value of Dummy[(Custom value of (Picked unit))])], dealing PeriodicDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] damage of attack type Chaos and damage type Acid[/b]
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Or - Any (Conditions) are true
                                            Conditions
                                                CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Equal to 4.00
                                                CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Equal to 8.00
                                                CurrentDuration[(Custom value of Dummy[(Custom value of (Picked unit))])] Equal to 12.00
                                    Then - Actions
                                        Set Multiplier[(Custom value of Dummy[(Custom value of (Picked unit))])] = ((Integer(DamageTaken[(Custom value of Dummy[(Custom value of (Picked unit))])])) / 100)
                                        Set MultiplierDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] = (PeriodicDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] x (Real(Multiplier[(Custom value of Dummy[(Custom value of (Picked unit))])])))
                                        Unit - Cause Dummy[(Custom value of (Picked unit))] to damage Target[(Custom value of Dummy[(Custom value of (Picked unit))])], dealing MultiplierDamage[(Custom value of Dummy[(Custom value of (Picked unit))])] damage of attack type Spells and damage type Normal

Credits: If you intend on using this spell in your map, please give credits to me (and Baka-Ranger, if he wants to be creditted, due to the fact that this spell wouldn't even work if he didn't fix it up)

Bugs, Suggestions etc: If you find a bug, or have any suggestion (whether it's an original idea, or just something that was recently changed in this spell's workings in DotA), please post it.

I just saw why it did 10 instead of 5, note the bolded parts :D
You might want to change that.

Credits not required but appreciated as usual. :)
 
Also, I have a sneaking suspicion that, using just picked unit rather than, "dummy[custom value (picked unit)]" will work fine.. =/

brb testing...

EDIT::
picked unit works fine... man that trigger was a mind bend and a half..

btw, the 6 damage is the 10 damage being reduced because of hero armour. so you might want to change it to universal or whatever it is to make it full damage.
 
Wow, super fast approval ^^

And as for the disabled trigger, does it really matter that much if it stays in the demo map (noone's going to be copying that into their own map, since import instructions specifically say not to copy it) so it won't make a difference to the map size of anyone who uses it. If it is that big of a deal, I guess I could remove it ^^
 
> as for the disabled trigger, does it really matter that much if it stays in the demo map

No it doesn't, but it's just pointless leaving it there.

Note:
You might want to add a screenshot, as there is a new spell index under construction that includes image previews of spells.
Otherwise you'll get a nice big "No Preview Available" under your thread's title :p.
 
> My spells rarely get comments after approval

As soon as spells are moved into this forum, no more comments basically...

There is very little activity in this forum so I'm not surprised.

As unfortunate as it may seem, that's just the way it is :(
 
Not at the moment, by the looks of things.

I would also like to see a JASS version as it would be helpful having this spell MUI, especially since it's from DotA.

Unless someone else wants to makes it, there won't be a JASS version ^^. And the spell is almost MUI since who is going to cast the spell on 1000 units in 12 sec?
 
after casting on some units (20-40) there is a horrible lag for me
and what is that for?
Code:
Maledict Damage detection
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in DummyGroup and do (Actions)
            Loop - Actions
                [B]Set RandomPt = (Random point in (Playable map area))[/B]
                [B]Unit - Create 1 Hidden Dummy for (Owner of (Picked unit)) at RandomPt facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to (Custom value of (Picked unit))
                Unit - Add a 0.01 second Generic expiration timer to (Last created unit)[/B]
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Target[(Custom value of [B](Last created unit)[/B])] Equal to (Triggering unit)
                    Then - Actions
                        Set DamageTaken[(Custom value of [B](Last created unit)[/B])] = (DamageTaken[(Custom value of (Last created unit))] + (Damage taken))
                    Else - Actions
                Custom script:   call RemoveLocation (udg_RandomPt)
why not use picked unit?
 
that was used before i noticed i could directly refer to picked units custom value. it doesnt really make a huge difference, and i dont think it will cause any bugs since the units took the correct additional damage in the demo map.

and what kind of PC do you have? seems crazy to have lag with only 20-40 (even though thats a fairly wide range) units. were all the affected units visible onscreen at the time? SFX couldve caused that lag. anyway, any lag claims are based on my experience with using the spell so its an extremely limited statement when i say "no lag" or something
 
Cool, would be even better if it was fully MUI (Even though I don't know JASS. :p).

+Rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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