Hello hivers. I have made 2 different custom damage over time skills with hashtables.
What I want to do next is a spell that spreads the buffs from the units that have the buff to nearby enemy units, 200 AoE or so. The best option would be if we could add the units to the already existing damage groups.
I have a couple of ideas how to do this, but they seem a bitt off.
The spells cast contains the buffs I want to use, adding them to the target. I managed to add the buffs only to one target by setting the AoE of the skills in the object editor to 0.
Icy touch = Frost Nova
Pestilent Strike = Acid Bomb
The both skills use the exact same method, but i'll post them both here, to see if someone can help me make the skill spreading the buffs.
What I want to do next is a spell that spreads the buffs from the units that have the buff to nearby enemy units, 200 AoE or so. The best option would be if we could add the units to the already existing damage groups.
I have a couple of ideas how to do this, but they seem a bitt off.
The spells cast contains the buffs I want to use, adding them to the target. I managed to add the buffs only to one target by setting the AoE of the skills in the object editor to 0.
Icy touch = Frost Nova
Pestilent Strike = Acid Bomb
-
Icy Touch
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Icy Touch (Text not done)
-
-
Actions
-
Set VariableSet IT_Damage = ((Real((Level of Icy Touch (Text not done) for (Triggering unit)))) x (125.00 + ((Real((Strength of (Triggering unit) (Include bonuses)))) x 0.45)))
-
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing IT_Damage damage of attack type Spells and damage type Magic
-
-------- --------
-
Set VariableSet IT_Dot = ((Real((Level of Icy Touch (Text not done) for (Triggering unit)))) x 15.00)
-
-------- --------
-
Hashtable - Save IT_Dot as 1 of (Key (Target unit of ability being cast).) in IT_Hashtable.
-
Hashtable - Save ((Real((Level of Icy Touch (Text not done) for (Triggering unit)))) x 4.00) as 0 of (Key (Target unit of ability being cast).) in IT_Hashtable.
-
-------- --------
-
Set VariableSet IT_Caster = (Triggering unit)
-
Hashtable - Save Handle OfIT_Caster as 2 of (Key (Triggering unit).) in IT_Hashtable.
-
-------- --------
-
Unit Group - Add (Target unit of ability being cast) to IT_DamageGroup
-
Unit Group - Add (Triggering unit) to IT_CasterGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Icy Touch Loop <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Icy Touch Loop <gen>
-
-
Else - Actions
-
-
-
-
Icy Touch Loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in IT_CasterGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet IT_Caster = (Load 2 of (Key (Picked unit).) in IT_Hashtable.)
-
-
-
Unit Group - Pick every unit in IT_DamageGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet IT_Time = (Load 0 of (Key (Picked unit).) from IT_Hashtable.)
-
Set VariableSet IT_Dot = (Load 1 of (Key (Picked unit).) from IT_Hashtable.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
IT_Time Greater than 0.00
-
-
Then - Actions
-
Unit - Cause IT_Caster to damage (Picked unit), dealing IT_Dot damage of attack type Spells and damage type Magic
-
-------- --------
-
Hashtable - Save (IT_Time - 1.00) as 0 of (Key (Picked unit).) in IT_Hashtable.
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from IT_DamageGroup.
-
-------- --------
-
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in IT_Hashtable.
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in IT_DamageGroup) Less than or equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Unit Group - Remove all units of IT_CasterGroup from IT_CasterGroup.
-
-
Else - Actions
-
-
-
The both skills use the exact same method, but i'll post them both here, to see if someone can help me make the skill spreading the buffs.
-
Pestilent Strike
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Pestilent Strike (Text not done)
-
-
Actions
-
Set VariableSet PS_Damage = ((Real((Level of Pestilent Strike (Text not done) for (Triggering unit)))) x 25.00)
-
Hashtable - Save PS_Damage as 1 of (Key (Target unit of ability being cast).) in PS_Hashtable.
-
-------- --------
-
Hashtable - Save 15.00 as 0 of (Key (Target unit of ability being cast).) in PS_Hashtable.
-
Set VariableSet PS_Caster = (Triggering unit)
-
Hashtable - Save Handle OfPS_Caster as 2 of (Key (Triggering unit).) in PS_Hashtable.
-
-------- --------
-
Unit Group - Add (Target unit of ability being cast) to PS_DamageGroup
-
Unit Group - Add (Triggering unit) to PS_CasterGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Pestilent Strike Loop <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Pestilent Strike Loop <gen>
-
-
Else - Actions
-
-
-
-
Pestilent Strike Loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in PS_CasterGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet PS_Caster = (Load 2 of (Key (Picked unit).) in PS_Hashtable.)
-
-
-
Unit Group - Pick every unit in PS_DamageGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet PS_Time = (Load 0 of (Key (Picked unit).) from PS_Hashtable.)
-
Set VariableSet PS_Damage = (Load 1 of (Key (Picked unit).) from PS_Hashtable.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
PS_Time Greater than 0.00
-
-
Then - Actions
-
Unit - Cause PS_Caster to damage (Picked unit), dealing PS_Damage damage of attack type Spells and damage type Magic
-
-------- --------
-
Hashtable - Save (PS_Time - 1.00) as 0 of (Key (Picked unit).) in PS_Hashtable.
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from PS_DamageGroup.
-
-------- --------
-
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in PS_Hashtable.
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in PS_DamageGroup) Less than or equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Unit Group - Remove all units of PS_CasterGroup from PS_CasterGroup.
-
-
Else - Actions
-
-
-