Hello, My trigger seems to work and I don't see mistakes. But I thought You could check to make sure.
The spell is like this: A Lightning shield to deal x1 intel of the caster each second around the target unit cast in a range of 200 to all enemy units for 12 seconds. I tested it and works fine, but you never know.
Troll Shield Spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Shield
Actions
Set TrollShieldDMG[(Player number of (Owner of (Casting unit)))] = ((Intelligence of (Casting unit) (Include bonuses)) + 1)
Set TrollShieldCaster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
Set TrollShieldTarget[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
Set TrollShieldTime[(Player number of (Owner of (Casting unit)))] = 12
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Wait 1.00 seconds
Set TrollShieldTime[(Player number of (Owner of (Casting unit)))] = (TrollShieldTime[(Player number of (Owner of (Casting unit)))] - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TrollShieldTime[(Player number of (Owner of TrollShieldCaster[(Player number of (Owner of (Casting unit)))]))] Greater than or equal to 1
Then - Actions
Set TrollShieldGroupDMG = (Units within 200.00 of (Position of TrollShieldTarget[(Player number of (Owner of (Casting unit)))]) matching (((Matching unit) belongs to an enemy of (Owner of TrollShieldTarget[(Player number of (Owner of (Casting unit)))])) Equal to True))
Unit Group - Pick every unit in TrollShieldGroupDMG and do (Unit - Cause TrollShieldTarget[(Player number of (Owner of (Casting unit)))] to damage (Picked unit), dealing (Real(TrollShieldDMG[(Player number of (Owner of (Casting unit)))])) damage of attack type Spells and damage type Normal)
Custom script: call DestroyGroup(udg_TrollShieldGroupDMG)
Else - Actions
The spell is like this: A Lightning shield to deal x1 intel of the caster each second around the target unit cast in a range of 200 to all enemy units for 12 seconds. I tested it and works fine, but you never know.
Troll Shield Spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Shield
Actions
Set TrollShieldDMG[(Player number of (Owner of (Casting unit)))] = ((Intelligence of (Casting unit) (Include bonuses)) + 1)
Set TrollShieldCaster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
Set TrollShieldTarget[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
Set TrollShieldTime[(Player number of (Owner of (Casting unit)))] = 12
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Wait 1.00 seconds
Set TrollShieldTime[(Player number of (Owner of (Casting unit)))] = (TrollShieldTime[(Player number of (Owner of (Casting unit)))] - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TrollShieldTime[(Player number of (Owner of TrollShieldCaster[(Player number of (Owner of (Casting unit)))]))] Greater than or equal to 1
Then - Actions
Set TrollShieldGroupDMG = (Units within 200.00 of (Position of TrollShieldTarget[(Player number of (Owner of (Casting unit)))]) matching (((Matching unit) belongs to an enemy of (Owner of TrollShieldTarget[(Player number of (Owner of (Casting unit)))])) Equal to True))
Unit Group - Pick every unit in TrollShieldGroupDMG and do (Unit - Cause TrollShieldTarget[(Player number of (Owner of (Casting unit)))] to damage (Picked unit), dealing (Real(TrollShieldDMG[(Player number of (Owner of (Casting unit)))])) damage of attack type Spells and damage type Normal)
Custom script: call DestroyGroup(udg_TrollShieldGroupDMG)
Else - Actions