Devalut
TH.net Regular
- Reaction score
- 7
Basically I was trying to look into a triggered damage Dot (based on the casters intelligence) that spreads to another unit if the effected unit dies.
If you play league of legends, there is a hero name Malazhar, and he has the exact ability. Heres a description of the spell:
I tried replicating this over a hashtable heal spell, which failed horribly...
This is basically what I'm looking for.
- Set damage & mana that's based upon the stat intelligence (for the caster)
- Damage dealt by the caster ( so the affected unit doesn't run away from
the dummy)
+rep
------------------------------------------------------------------------------------------------
Found it!
(well, semi made it and found it.)
Credits to maker of the life leak, as i completly Frankenstein-ed his spell
http://www.hiveworkshop.com/forums/spells-569/hashtables-life-leak-v0-02-a-167208/
Heres the triggers (for those looking for something like this!)
Now I stink at triggering, so if someone could also check for leaks or possible ways to fix this would be appreciated!
If you play league of legends, there is a hero name Malazhar, and he has the exact ability. Heres a description of the spell:
Malzahar infects his target's mind with cruel visions of their own demise, dealing magic damage over 4 seconds. If the target dies while afflicted by the visions, they pass the curse on to a nearby enemy unit, refreshing the duration and restoring mana to Malzahar
I tried replicating this over a hashtable heal spell, which failed horribly...
This is basically what I'm looking for.
- Set damage & mana that's based upon the stat intelligence (for the caster)
- Damage dealt by the caster ( so the affected unit doesn't run away from
the dummy)
+rep
------------------------------------------------------------------------------------------------
Found it!
(well, semi made it and found it.)
Credits to maker of the life leak, as i completly Frankenstein-ed his spell
http://www.hiveworkshop.com/forums/spells-569/hashtables-life-leak-v0-02-a-167208/
Heres the triggers (for those looking for something like this!)
MV Ini
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set MV_Hash = (Last created hashtable)
Set MV_Abilty = Mark of the Void
MV Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to MV_Abilty
((Triggering unit) is A Hero) Equal to True
Actions
Set Caster = (Triggering unit)
Set Target = (Target unit of ability being cast)
Set Points[1] = (Position of Caster)
Unit - Create 1 Dummy Unit for (Owner of Caster) at Points[1] facing Default building facing degrees
Hashtable - Save 4.00 as 0 of (Key (Last created unit)) in MV_Hash
Hashtable - Save 0.05 as (Key Decay) of (Key (Last created unit)) in MV_Hash
Hashtable - Save (((20.00 + (80.00 x (Real((Level of (Triggering unit)))))) + 0.00) / 4.00) as 1 of (Key (Last created unit)) in MV_Hash
Floating Text - Create floating text that reads (String((Integer(((Load 1 of (Key (Last created unit)) from MV_Hash) x 4.00))))) at Points[1] 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 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable suspend state
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.25 seconds
Hashtable - Save Handle OfCaster as 2 of (Key (Last created unit)) in MV_Hash
Hashtable - Save Handle OfTarget as 3 of (Key (Last created unit)) in MV_Hash
If ((LifeLeaks is empty) Equal to True) then do (Trigger - Turn on MV Loop <gen>) else do (Do nothing)
Unit Group - Add (Last created unit) to LifeLeaks
Custom script: call RemoveLocation(udg_Points[1])
MV Loop
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in LifeLeaks and do (Actions)
Loop - Actions
Set Caster = (Load 2 of (Key (Picked unit)) in MV_Hash)
Set Target = (Load 3 of (Key (Picked unit)) in MV_Hash)
Set Points[1] = (Position of Caster)
Set Real[1] = (Load 1 of (Key (Picked unit)) from MV_Hash)
Set Real[3] = (Load 0 of (Key (Picked unit)) from MV_Hash)
Set Real[3] = (Real[3] - 0.05)
Set Real[4] = (Load (Key Decay) of (Key (Picked unit)) from MV_Hash)
Set Real[4] = (Real[4] - 0.05)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
Real[3] Equal to 0.00
(Caster is dead) Equal to True
(Target is dead) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Target is dead) Equal to True
Then - Actions
Unit - Set mana of Caster to ((Mana of Caster) + (Real((Intelligence of Caster (Include bonuses)))))
Special Effect - Create a special effect attached to the chest of Caster using Abilities\Spells\Undead\ReplenishMana\SpiritTouchTarget.mdl
Special Effect - Destroy (Last created special effect)
Set T_Point = (Position of Target)
Set T_Group = (Units within 500.00 of T_Point matching ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of Caster)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in T_Group) Equal to 0
Then - Actions
Else - Actions
Unit Group - Pick every unit in (Random 1 units from T_Group) and do (Actions)
Loop - Actions
Set Target = (Picked unit)
Special Effect - Create a special effect at T_Point using Abilities\Spells\Items\AIso\AIsoTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Create 1 Dummy Unit for (Owner of Caster) at T_Point facing Default building facing degrees
Unit - Add MV_Abilty to (Last created unit)
Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
Hashtable - Save 4.00 as 0 of (Key (Last created unit)) in MV_Hash
Hashtable - Save 0.05 as (Key Decay) of (Key (Last created unit)) in MV_Hash
Hashtable - Save (((20.00 + (80.00 x (Real((Level of Caster))))) + 0.00) / 4.00) as 1 of (Key (Last created unit)) in MV_Hash
Hashtable - Save Handle OfCaster as 2 of (Key (Last created unit)) in MV_Hash
Hashtable - Save Handle OfTarget as 3 of (Key (Last created unit)) in MV_Hash
If ((LifeLeaks is empty) Equal to True) then do (Trigger - Turn on MV Loop <gen>) else do (Do nothing)
Unit Group - Add (Last created unit) to LifeLeaks
Custom script: call RemoveLocation(udg_T_Point)
Else - Actions
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in MV_Hash
Unit Group - Remove (Picked unit) from LifeLeaks
Unit - Remove (Picked unit) from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Real[4] Equal to 0.00
Then - Actions
Set Real[4] = 1.00
Unit - Cause Caster to damage Target, dealing Real[1] damage of attack type Spells and damage type Universal
Special Effect - Create a special effect attached to the chest of Target using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Hashtable - Save Real[3] as 0 of (Key (Picked unit)) in MV_Hash
Hashtable - Save Real[4] as (Key Decay) of (Key (Picked unit)) in MV_Hash
Custom script: call RemoveLocation(udg_Points[1])
If ((LifeLeaks is empty) Equal to True) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
Now I stink at triggering, so if someone could also check for leaks or possible ways to fix this would be appreciated!