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: 782
Reaction score
107
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. :)
 
Reaction score
107
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.
 

Flare

Stops copies me!
Reaction score
662
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 ^^
 

Tinki3

Special Member
Reaction score
418
> 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.
 

Tinki3

Special Member
Reaction score
418
> 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 :(
 

Flare

Stops copies me!
Reaction score
662
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?
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
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?
 

Flare

Stops copies me!
Reaction score
662
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
 

NapaHero

Back from the dead...
Reaction score
43
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.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top