Spell Reduce Add
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Reduce Spell Damage Aura
((Triggering unit) is in Haze_Group) Equal to False
Actions
Unit Group - Add (Triggering unit) to Haze_Group
Trigger - Turn on Spell Reduce Pick Unit <gen>
Spell Reduce Remove
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Tome of Retraining
((Triggering unit) is in Haze_Group) Equal to True
Actions
Unit Group - Remove (Triggering unit) from Haze_Group
If ((Number of units in Haze_Group) Equal to 0) then do (Trigger - Turn off Spell Reduce Pick Unit <gen>) else do (Do nothing)
Spell Reduce Pick Unit
Events
Time - Every 0.25 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Haze_Group and do (Actions)
Loop - Actions
-------- For this hero who owns Infernal Haze... --------
Set Haze_Temp_Unit_1 = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Haze_Temp_Unit_1 is alive) Equal to True
Then - Actions
Set Haze_Temp_Loc_1 = (Position of Haze_Temp_Unit_1)
-------- Temp Group 1 = Subgroup of all affected units --------
Set Haze_Temp_Group_1 = (Units within 900.00 of Haze_Temp_Loc_1 matching (((Matching unit) has buff Reduce Spell Damage Aura ) Equal to True))
Custom script: call RemoveLocation(udg_Haze_Temp_Loc_1)
-------- Temp Group 2 = Overall group of all affected units --------
Unit Group - Pick every unit in Haze_Temp_Group_1 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in Haze_Temp_Group_2) Equal to False
Then - Actions
Unit Group - Add (Picked unit) to Haze_Temp_Group_2
Unit - Add Spell Reduce (Reduce Spell Damage Aura) to (Picked unit)
Else - Actions
Else - Actions
-------- If the unit was added before to Temp Group 2 and no longer has the aura buff, remove the unit from the group and remove the passive skill. --------
Unit Group - Pick every unit in Haze_Temp_Group_2 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Reduce Spell Damage Aura ) Equal to False
Then - Actions
Unit - Remove Spell Reduce (Reduce Spell Damage Aura) from (Picked unit)
Unit Group - Remove (Picked unit) from Haze_Temp_Group_2
Else - Actions
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Reduce Spell Damage Aura
((Triggering unit) is in Haze_Group) Equal to False
Actions
Unit Group - Add (Triggering unit) to Haze_Group
Trigger - Turn on Spell Reduce Pick Unit <gen>
Spell Reduce Remove
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Tome of Retraining
((Triggering unit) is in Haze_Group) Equal to True
Actions
Unit Group - Remove (Triggering unit) from Haze_Group
If ((Number of units in Haze_Group) Equal to 0) then do (Trigger - Turn off Spell Reduce Pick Unit <gen>) else do (Do nothing)
Spell Reduce Pick Unit
Events
Time - Every 0.25 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Haze_Group and do (Actions)
Loop - Actions
-------- For this hero who owns Infernal Haze... --------
Set Haze_Temp_Unit_1 = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Haze_Temp_Unit_1 is alive) Equal to True
Then - Actions
Set Haze_Temp_Loc_1 = (Position of Haze_Temp_Unit_1)
-------- Temp Group 1 = Subgroup of all affected units --------
Set Haze_Temp_Group_1 = (Units within 900.00 of Haze_Temp_Loc_1 matching (((Matching unit) has buff Reduce Spell Damage Aura ) Equal to True))
Custom script: call RemoveLocation(udg_Haze_Temp_Loc_1)
-------- Temp Group 2 = Overall group of all affected units --------
Unit Group - Pick every unit in Haze_Temp_Group_1 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in Haze_Temp_Group_2) Equal to False
Then - Actions
Unit Group - Add (Picked unit) to Haze_Temp_Group_2
Unit - Add Spell Reduce (Reduce Spell Damage Aura) to (Picked unit)
Else - Actions
Else - Actions
-------- If the unit was added before to Temp Group 2 and no longer has the aura buff, remove the unit from the group and remove the passive skill. --------
Unit Group - Pick every unit in Haze_Temp_Group_2 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Reduce Spell Damage Aura ) Equal to False
Then - Actions
Unit - Remove Spell Reduce (Reduce Spell Damage Aura) from (Picked unit)
Unit Group - Remove (Picked unit) from Haze_Temp_Group_2
Else - Actions