- Reaction score
- 663
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:
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:
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.
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.
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
- If - Conditions
- 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)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- 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))])]
- Conditions
- Or - Any (Conditions) are true
- 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
- Conditions
- Or - Any (Conditions) are true
- 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
- If - Conditions
- Else - Actions
- If - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Unit Group - Pick every unit in DummyGroup and do (Actions)
- Events
- --------------------------------------------------
- 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
- If - Conditions
- Loop - Actions
- Unit Group - Pick every unit in DummyGroup and do (Actions)
- Events
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
-
23.5 KB Views: 747