- Joined
- Feb 15, 2013
- Messages
- 372
After i made this spell, i tested with an enemy unit, then i put some allies nearby it and tested it... It do damaged nearby allies
The Area Damage is only unlock at Level 3 of the abilities
Here's the trigger
[trigger="Slice a Piece"]
Slice a Piece
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Slice a Piece
Actions
Set Slice_X = (Slice_X + 1)
Set Slice_Caster[Slice_X] = (Triggering unit)
Set Slice_Target[Slice_X] = (Target unit of ability being cast)
Set Slice_Damage[1] = (75.00 + ((25.00 + (15.00 x (Real((Hero level of Slice_Caster[Slice_X]))))) + (1.75 x (Real(((Owner of Slice_Caster[Slice_X]) Current gold))))))
Set Slice_Damage[2] = (100.00 + ((25.00 + (15.00 x (Real((Hero level of Slice_Caster[Slice_X]))))) + (1.75 x (Real(((Owner of Slice_Caster[Slice_X]) Current gold))))))
Set Slice_Damage[3] = (125.00 + ((25.00 + (15.00 x (Real((Hero level of Slice_Caster[Slice_X]))))) + (1.75 x (Real(((Owner of Slice_Caster[Slice_X]) Current gold))))))
Set Slice_Level = (Level of (Ability being cast) for Slice_Caster[Slice_X])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Slice_Level Equal to 3
Then - Actions
Set Slice_Group[Slice_X] = (Units within 380.00 of (Position of Slice_Target[Slice_X]) matching ((((Matching unit) is A structure) Equal to False) or ((((Matching unit) is alive) Equal to True) or (((Matching unit) belongs to an enemy of (Owner of Slice_Caster[Slice_X])) Equal to True)
Unit Group - Pick every unit in Slice_Group[Slice_X] and do (Actions)
Loop - Actions
Set Slice_GroupTarget[Slice_X] = (Picked unit)
Unit - Cause Slice_Caster[Slice_X] to damage Slice_GroupTarget[Slice_X], dealing 85.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the origin of Slice_Target[Slice_X] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Unit - Cause Slice_Caster[Slice_X] to damage Slice_Target[Slice_X], dealing Slice_Damage[Slice_Level] damage of attack type Magic and damage type Lightning
Special Effect - Destroy (Last created special effect)
Else - Actions
Special Effect - Create a special effect attached to the origin of Slice_Target[Slice_X] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Unit - Cause Slice_Caster[Slice_X] to damage Slice_Target[Slice_X], dealing Slice_Damage[Slice_Level] damage of attack type Magic and damage type Lightning
Special Effect - Destroy (Last created special effect)
Wait 0.50 seconds
Set Slice_Caster[Slice_X] = No unit
Set Slice_Target[Slice_X] = No unit
Set Slice_GroupTarget[Slice_X] = No unit
Custom script: call DestroyGroup(udg_Slice_Group[udg_Slice_X])
Set Slice_X = (Slice_X - 1)
[/Trigger]
The Area Damage is only unlock at Level 3 of the abilities
Here's the trigger
[trigger="Slice a Piece"]
Slice a Piece
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Slice a Piece
Actions
Set Slice_X = (Slice_X + 1)
Set Slice_Caster[Slice_X] = (Triggering unit)
Set Slice_Target[Slice_X] = (Target unit of ability being cast)
Set Slice_Damage[1] = (75.00 + ((25.00 + (15.00 x (Real((Hero level of Slice_Caster[Slice_X]))))) + (1.75 x (Real(((Owner of Slice_Caster[Slice_X]) Current gold))))))
Set Slice_Damage[2] = (100.00 + ((25.00 + (15.00 x (Real((Hero level of Slice_Caster[Slice_X]))))) + (1.75 x (Real(((Owner of Slice_Caster[Slice_X]) Current gold))))))
Set Slice_Damage[3] = (125.00 + ((25.00 + (15.00 x (Real((Hero level of Slice_Caster[Slice_X]))))) + (1.75 x (Real(((Owner of Slice_Caster[Slice_X]) Current gold))))))
Set Slice_Level = (Level of (Ability being cast) for Slice_Caster[Slice_X])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Slice_Level Equal to 3
Then - Actions
Set Slice_Group[Slice_X] = (Units within 380.00 of (Position of Slice_Target[Slice_X]) matching ((((Matching unit) is A structure) Equal to False) or ((((Matching unit) is alive) Equal to True) or (((Matching unit) belongs to an enemy of (Owner of Slice_Caster[Slice_X])) Equal to True)
Unit Group - Pick every unit in Slice_Group[Slice_X] and do (Actions)
Loop - Actions
Set Slice_GroupTarget[Slice_X] = (Picked unit)
Unit - Cause Slice_Caster[Slice_X] to damage Slice_GroupTarget[Slice_X], dealing 85.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the origin of Slice_Target[Slice_X] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Unit - Cause Slice_Caster[Slice_X] to damage Slice_Target[Slice_X], dealing Slice_Damage[Slice_Level] damage of attack type Magic and damage type Lightning
Special Effect - Destroy (Last created special effect)
Else - Actions
Special Effect - Create a special effect attached to the origin of Slice_Target[Slice_X] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Unit - Cause Slice_Caster[Slice_X] to damage Slice_Target[Slice_X], dealing Slice_Damage[Slice_Level] damage of attack type Magic and damage type Lightning
Special Effect - Destroy (Last created special effect)
Wait 0.50 seconds
Set Slice_Caster[Slice_X] = No unit
Set Slice_Target[Slice_X] = No unit
Set Slice_GroupTarget[Slice_X] = No unit
Custom script: call DestroyGroup(udg_Slice_Group[udg_Slice_X])
Set Slice_X = (Slice_X - 1)
[/Trigger]