Moderator
M
Moderator
12:17, 18th Jul 2011
Maker: v1.5
Approved.
Maker: v1.5
Approved.
Description
Creates a circle of fire that circulates around the caster withing 700 AoE and deals 5, 10, 15 damage per 0.10 seconds within 150 range of every fire projectile. Also strikes a random target with lighting, dealing Intelligence of caster multiple by 1, 2, 3, if target dies from lightning it will explode and deal 50, 100, 150 bonus damage in 250 AoE.
Lasts 5, 10, 15 seconds.
Flame Circle Settings

Events


Map initialization

Conditions

Actions


-------- -------------------------------------------------- --------


-------- Ability that is casted by hero --------


-------- -------------------------------------------------- --------


Set FC_Ability = |c00ff0303F|rlame Circle


-------- -------------------------------------------------- --------


-------- Speed of fire projectile --------


-------- -------------------------------------------------- --------


Set FC_Speed = 30.00


-------- -------------------------------------------------- --------


-------- Maximum area of circle --------


-------- -------------------------------------------------- --------


Set FC_AoE1 = 700.00


-------- -------------------------------------------------- --------


-------- Area of damage near the circle --------


-------- -------------------------------------------------- --------


Set FC_AoE2 = 150.00


-------- -------------------------------------------------- --------


-------- Number of effects around the caster --------


-------- -------------------------------------------------- --------


Set FC_Number = 12


-------- -------------------------------------------------- --------


-------- Set the next value to tru if you want to show the text that shows damage of lighting --------


-------- -------------------------------------------------- --------


Set FC_Check = True
Flame Circle Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to FC_Ability

Actions


-------- -------------------------------------------------- --------


-------- Indexing --------


-------- -------------------------------------------------- --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




FC_Index1 Equal to 0



Then - Actions




Trigger - Turn on Flame Circle Loop <gen>



Else - Actions


Set FC_Index1 = (FC_Index1 + 1)


Set FC_Index2 = (FC_Index2 + 1)


-------- --------------------------------------------------OTHER SETTINGS-------------------------------------------------- --------


-------- -------------------------------------------------- --------


-------- Caster --------


-------- -------------------------------------------------- --------


Set FC_Caster[FC_Index2] = (Triggering unit)


Set FC_Level = (Level of (Ability being cast) for FC_Caster[FC_Index2])


-------- -------------------------------------------------- --------


-------- Damage near the circle --------


-------- -------------------------------------------------- --------


Set FC_Damage1 = ((Real(FC_Level)) x 5.00)


-------- -------------------------------------------------- --------


-------- Damage of lightning --------


-------- -------------------------------------------------- --------


Set FC_Damage2 = (Real((FC_Level x (Intelligence of FC_Caster[FC_Index2] (Include bonuses)))))


-------- -------------------------------------------------- --------


-------- Damage of lightning explosion --------


-------- -------------------------------------------------- --------


Set FC_Damage3 = ((Real(FC_Level)) x 50.00)


-------- -------------------------------------------------- --------


-------- Duration of the spell --------


-------- -------------------------------------------------- --------


Set FC_Duration[FC_Index2] = ((Real((Level of FC_Ability for FC_Caster[FC_Index2]))) x 5.00)
Flame Circle Loop

Events


Time - Every 0.10 seconds of game time

Conditions

Actions


For each (Integer FC_Index3) from 1 to FC_Index2, do (Actions)



Loop - Actions




-------- -------------------------------------------------- --------




-------- Calculating duration and angle --------




-------- !!!WARNING!!! If you want to change the periodic event to some other time then change the value in FC_Duration where you subtract it !!!WARNING!!! --------




-------- -------------------------------------------------- --------




Custom script: set udg_FC_Duration[udg_FC_Index3] = ( udg_FC_Duration[udg_FC_Index3] - 0.10 ) //HERE!!!




Set FC_Real[FC_Index3] = (FC_Real[FC_Index3] + FC_Speed)




-------- -------------------------------------------------- --------




-------- Creating effect --------




-------- -------------------------------------------------- --------




Set FC_Point1 = (Position of FC_Caster[FC_Index3])




For each (Integer A) from 1 to FC_Number, do (Actions)





Loop - Actions






Set FC_Point2 = (FC_Point1 offset by FC_AoE1 towards (FC_Real[FC_Index3] + ((360.00 / (Real(FC_Number))) x (Real((Integer A))))) degrees)






Special Effect - Create a special effect at FC_Point2 using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl






Special Effect - Destroy (Last created special effect)






-------- -------------------------------------------------- --------






-------- Damaging --------






-------- -------------------------------------------------- --------






Custom script: set bj_wantDestroyGroup = true






Unit Group - Pick every unit in (Units within FC_AoE2 of FC_Point2 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of FC_Caster[FC_Index3])) Equal to True)))) and do (Actions)







Loop - Actions








Unit - Cause FC_Caster[FC_Index3] to damage (Picked unit), dealing FC_Damage1[FC_Index3] damage of attack type Spells and damage type Normal






-------- -------------------------------------------------- --------






-------- Removing Leaks --------






-------- -------------------------------------------------- --------






Custom script: call RemoveLocation(udg_FC_Point2)




-------- -------------------------------------------------- --------




-------- Check if any enemy unit is in circle, if yes then we pick a random one and damage him --------




-------- -------------------------------------------------- --------




Set FC_UnitGroup[FC_Index3] = (Units within FC_AoE1 of FC_Point1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of FC_Caster[FC_Index3])) Equal to True))))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Number of units in FC_UnitGroup[FC_Index3]) Greater than or equal to 1





Then - Actions






Set FC_Target[FC_Index3] = (Random unit from FC_UnitGroup[FC_Index3])






Set FC_Point3 = (Position of FC_Target[FC_Index3])






-------- -------------------------------------------------- --------






-------- Damaging --------






-------- -------------------------------------------------- --------






Unit - Cause FC_Caster[FC_Index3] to damage FC_Target[FC_Index3], dealing FC_Damage2[FC_Index3] damage of attack type Spells and damage type Normal






-------- -------------------------------------------------- --------






-------- Showing text, if enabled --------






-------- -------------------------------------------------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








FC_Check Equal to True







Then - Actions








Floating Text - Create floating text that reads (|c00ff0303 + (String((Integer(FC_Damage2[FC_Index3]))))) at FC_Point3 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 100.00 towards 90.00 degrees








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 1.00 seconds








Floating Text - Hide (Last created floating text) for (All players)








Floating Text - Show (Last created floating text) for (Player group((Owner of FC_Caster[FC_Index3])))








Floating Text - Show (Last created floating text) for (Player group((Owner of FC_Target[FC_Index3])))







Else - Actions






-------- -------------------------------------------------- --------






-------- If target died from lightning we explode him --------






-------- -------------------------------------------------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(FC_Target[FC_Index3] is dead) Equal to True







Then - Actions








Special Effect - Create a special effect at FC_Point3 using Abilities\Spells\Other\Doom\DoomDeath.mdl








Special Effect - Destroy (Last created special effect)








-------- -------------------------------------------------- --------








-------- Damaging units around the target --------








-------- -------------------------------------------------- --------








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within FC_AoE2 of FC_Point2 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of FC_Caster[FC_Index3])) Equal to True)))) and do (Actions)









Loop - Actions










Unit - Cause FC_Caster[FC_Index3] to damage (Picked unit), dealing FC_Damage3[FC_Index3] damage of attack type Spells and damage type Normal







Else - Actions






-------- -------------------------------------------------- --------






-------- Removing lightning --------






-------- -------------------------------------------------- --------






Lightning - Destroy FC_Lightning[FC_Index3]






-------- -------------------------------------------------- --------






-------- Creating lightning --------






-------- -------------------------------------------------- --------






Set FC_x1 = (Position of FC_Caster[FC_Index3])






Set FC_y1 = (Position of FC_Caster[FC_Index3])






Set FC_x2 = (Position of FC_Target[FC_Index3])






Set FC_y2 = (Position of FC_Target[FC_Index3])






Custom script: set udg_FC_z1 = GetUnitFlyHeight(udg_FC_Caster[udg_FC_Index3])






Custom script: set udg_FC_z2 = GetUnitFlyHeight(udg_FC_Target[udg_FC_Index3])






Custom script: set udg_FC_Lightning[udg_FC_Index3] = AddLightningEx( "AFOD" , true, GetLocationX(udg_FC_x1), GetLocationY(udg_FC_y1), udg_FC_z1, GetLocationX(udg_FC_x2), GetLocationY(udg_FC_y2), udg_FC_z2)






-------- -------------------------------------------------- --------






-------- Removing Leaks --------






-------- -------------------------------------------------- --------






Custom script: call RemoveLocation(udg_FC_Point3)






Custom script: call RemoveLocation(udg_FC_x1)






Custom script: call RemoveLocation(udg_FC_x2)






Custom script: call RemoveLocation(udg_FC_y1)






Custom script: call RemoveLocation(udg_FC_y2)





Else - Actions






-------- -------------------------------------------------- --------






-------- Removing lightning, if no units are left in circle and last unit was killed --------






-------- -------------------------------------------------- --------






Lightning - Destroy FC_Lightning[FC_Index3]




-------- -------------------------------------------------- --------




-------- Turning trigger off, if duration expired --------




-------- -------------------------------------------------- --------




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






FC_Duration[FC_Index3] Less than or equal to 0.00





Then - Actions






Set FC_Index1 = (FC_Index1 - 1)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








FC_Index1 Equal to 0







Then - Actions








-------- -------------------------------------------------- --------








-------- Removing Leaks --------








-------- -------------------------------------------------- --------








Lightning - Destroy FC_Lightning[FC_Index3]








Custom script: call RemoveLocation(udg_FC_Point1)








Custom script: call RemoveLocation(udg_FC_Point2)








Custom script: call RemoveLocation(udg_FC_Point3)








Custom script: call DestroyGroup(udg_FC_UnitGroup[udg_FC_Index3])








Set FC_Index2 = 0








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions




-------- -------------------------------------------------- --------




-------- Removing Leaks --------




-------- -------------------------------------------------- --------




Custom script: call RemoveLocation(udg_FC_Point1)




Custom script: call DestroyGroup(udg_FC_UnitGroup[udg_FC_Index3])
Changelog
-02.04.2011 19:08 - uploaded;
-02.04.2011 21:58 - speed variable is now set to increase the speed of projectiles;
-03.04.2011 13:07 - scripts that where destroying locations are now in right place;
- added lightning height;
- now i destroy lighting before its creationж
- removed array from FC_Damage and separated into 3 different variables;
-04.04.2011 19:18 - fixed the removal of last lightning;
-01.06.2011 17:54 - changed the damage variables into reals;
- stored a level of ability into variable to be more efficient;
-30.06.2011 10:11 - added arrays to damage variables.