Moderator
M
Moderator
Fire Circle v1.06b | Reviewed by Maker | 3rd Aug 2013 | ||||
| APPROVED | ||||
|
|
Fire Circle Settings

Evénements


Map initialization

Conditions

Actions


-------- Creation of the hashtable --------


Table de hachage - Create a hashtable


Set FC_Hashtable = (Last created hashtable)


-------- We set if the spell uses specials effetcs, if set to false, the spell will use it but the fps may drop (warning do not leave a blank for SFX models, because there is always few effects that won't affect the game/map performances) --------


Set FC_BetterFPS = FALSE


-------- Setting the dummies ID --------


Set FC_DummyType = Dummy (Fire Circle)


-------- We set the max distance the orbs can reach before they disappear --------


Set FC_MaxDistanceBase = 600.00


Set FC_MaxDistanceLevel = 200.00


-------- Setting how fast the circle expends and how fast the orbs rotate. --------


Set FC_Speed_Base = 2.50


Set FC_Speed_Level = 2.50


-------- Setting how often the effects will be created in the loop --------


Set FC_Effect_Timer = 0.09


-------- Setting the units that can be damaged by the spell --------


Set FC_Damage_Air = TRUE


Set FC_Damage_Ground = TRUE


Set FC_Damage_Heroes = TRUE


Set FC_Damage_Immune = FALSE


Set FC_Damage_Mechanical = TRUE


Set FC_Damage_Building = FALSE


-------- Setting the damages of the spell --------


Set FC_Base_Damage = 50.00


Set FC_Level_Damage = 50.00


-------- Setting the "attack" type of the spell --------


Set FC_Attack_Type = Magie


-------- Setting the damage type of the spell --------


Set FC_Damage_Type = Feu


-------- Setting if the spell can do critical damage --------


Set FC_Critical = TRUE


-------- Setting the critical multiplier --------


Set FC_CriticalMultiplier = 2.00


-------- Setting the chances of critical --------


Set FC_CriticalChanceBase = 1.00


Set FC_CriticalChanceLvl = 2.00


-------- Setting the SFX model (disabled if FC_BetterFPS is set to TRUE) --------


Set FC_SFX = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl


-------- Setting how close of the dummies the units must be to be damaged(you have to change the dummies ability range of effect too) --------


Set FC_RangeofDamageBase = 150.00


Set FC_RangeofDamageLevel = 0.00


-------- Setting the SFX on damaged units (disabled if FC_BetterFPS is set to TRUE) --------


Set FC_SFX_Damage_Unit = Abilities\Weapons\FireBallMissile\FireBallMissile.mdl


-------- Setting if trees can be destroyed by the spell --------


Set FC_DestroyTrees = TRUE


-------- Setting the "TreeRemover" ID (disabled if FC_Destroy_Trees is set to FALSE) --------


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



Si - Conditions




FC_DestroyTrees Egal à TRUE



Alors - Actions




Set FC_TreeRemoverType = TreeRemover (Fire Circle)




Set FC_TmpPoint = (Center of (Playable map area))




Unité - Create 1 FC_TreeRemoverType for Neutre Passif at FC_TmpPoint facing Orientation bâtiment par défaut degrees




Set FC_TreeRemover = (Last created unit)




Unité - Hide FC_TreeRemover




Custom script: call UnitAddAbility( udg_FC_TreeRemover, 'Aloc')




Custom script: call RemoveLocation(udg_FC_TmpPoint)



Sinon - Actions


-------- Setting the "HandleDummy" ID (it's the dummy who makes the spell MUI, just import the one there is in this map) --------


Set FC_HandleDummyType = Dummy (Fire Circle) (Handle)


-------- Setting the range of how close the trees must be to be destroyed (do not touch if you set FC_DestroyTrees to FALSE) --------


Set FC_RangeofDamageTreesBase = 180.00


Set FC_RangeofDamageTreesLevel = 60.00


-------- Setting the SFX when trees are destroyed (disabled if FC_BetterFPS is set to TRUE) --------


Set FC_SFX_Damage_Trees = Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl


-------- Setting the ability of the spell( just import the ability like the dummies and the TreeRemover) --------


Set FC_Ability = Fire Circle


-------- Setting the ability of the dummies( just import the ability like the dummies and the TreeRemover) --------


Set FC_DummyAbility = Fire Circle Damage


-------- Setting the buff used by the dummies' ability --------


Set FC_Buff = Fire_Circle_Damage_Buff
Fire Circle Start

Evénements


Unité - A unit Initie l'effet d'une compétence

Conditions


(Ability being cast) Egal à FC_Ability

Actions


Set FC_TmpCaster = (Casting unit)


Set FC_TmpPoint = (Position of FC_TmpCaster)


Unité - Create 1 FC_HandleDummyType for (Owner of FC_TmpCaster) at FC_TmpPoint facing Orientation bâtiment par défaut degrees


Set FC_TmpHandle = (Last created unit)


Groupe unité - Add (Last created unit) to FC_Group


-------- Setting the variable of the instance --------


Table de hachage - Save (Level of FC_Ability for FC_TmpCaster) as (Key Abilitylevel) of (Key FC_TmpHandle) in FC_Hashtable


Table de hachage - Save Handle OfFC_TmpCaster as (Key Caster) of (Key FC_TmpHandle) in FC_Hashtable


Set FC_Angle_Real = ((Facing of FC_TmpCaster) - 120.00)


Set FC_TmpPoint = (Position of FC_TmpCaster)


-------- Creating the first dummy --------


For each (Integer FC_i) from 1 to 3, do (Actions)



Boucle - Actions




Set FC_Angle_Real = (FC_Angle_Real + 120.00)




Set FC_TmpPoint2 = (FC_TmpPoint offset by 90.00 towards FC_Angle_Real degrees)




Table de hachage - Save FC_Angle_Real as FC_i of (Key FC_TmpHandle) in FC_Hashtable




Unité - Create 1 FC_DummyType for (Owner of FC_TmpCaster) at FC_TmpPoint2 facing Orientation bâtiment par défaut degrees




Set FC_TmpDummy = (Last created unit)




Unité - Set level of FC_DummyAbility for FC_TmpDummy to (Load (Key Abilitylevel) of (Key FC_TmpHandle) from FC_Hashtable)




Table de hachage - Save Handle OfFC_TmpDummy as (FC_i + 3) of (Key FC_TmpHandle) in FC_Hashtable




Custom script: set udg_FC_TmpDummy = null




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





Si - Conditions






FC_BetterFPS Egal à FALSE





Alors - Actions






Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX






Effet spécial - Destroy (Last created special effect)





Sinon - Actions




Custom script: call RemoveLocation(udg_FC_TmpPoint2)


Custom script: call RemoveLocation(udg_FC_TmpPoint)


-------- Setting the range of the instance to 0.00 --------


Set FC_Distance = 0.00


Table de hachage - Save FC_Distance as (Key Distance) of (Key FC_TmpHandle) in FC_Hashtable


Set FC_MaxDistance = (FC_MaxDistanceBase + ((Real((Level of FC_Ability for FC_TmpCaster))) x FC_MaxDistanceLevel))


Table de hachage - Save FC_MaxDistance as (Key MaxDistance) of (Key FC_TmpHandle) in FC_Hashtable


-------- Setting the timer of the instance --------


Set FC_Effect_Timer_Instance = FC_Effect_Timer


Table de hachage - Save FC_Effect_Timer_Instance as (Key Effecttimer) of (Key FC_TmpHandle) in FC_Hashtable


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



Si - Conditions




(Number of units in FC_Group) Egal à 1



Alors - Actions




Déclencheur - Turn on Fire Circle Loop <gen>




Déclencheur - Turn on Fire Circle Damage <gen>



Sinon - Actions


Custom script: set udg_FC_TmpHandle = null


Custom script: set udg_FC_TmpCaster = null
Fire Circle Loop

Evénements


Temps - Every 0.03 seconds of game time

Conditions

Actions


Groupe unité - Pick every unit in FC_Group and do (Actions)



Boucle - Actions




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





Si - Conditions






((Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable) is alive) Egal à TRUE





Alors - Actions






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







Si - Conditions








(Load (Key Distance) of (Key (Picked unit)) from FC_Hashtable) Inférieur à (Load (Key MaxDistance) of (Key (Picked unit)) from FC_Hashtable)







Alors - Actions








-------- Setting the center of the circle so to the caster's position --------








Set FC_TmpPoint = (Position of (Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable))








-------- Increasing the distance so the circle is growing --------








Set FC_Distance = ((Load (Key Distance) of (Key (Picked unit)) from FC_Hashtable) + (FC_Speed_Base + (FC_Speed_Level x (Real((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable))))))








Table de hachage - Save FC_Distance as (Key Distance) of (Key (Picked unit)) in FC_Hashtable








-------- Increasing the angle and moving the dummies --------








For each (Integer FC_i) from 1 to 3, do (Actions)









Boucle - Actions










Set FC_Angle_Real = ((Load FC_i of (Key (Picked unit)) from FC_Hashtable) + (FC_Speed_Base + (FC_Speed_Level x (Real((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable))))))










Table de hachage - Save FC_Angle_Real as FC_i of (Key (Picked unit)) in FC_Hashtable










Set FC_TmpPoint2 = (FC_TmpPoint offset by (Load (Key Distance) of (Key (Picked unit)) from FC_Hashtable) towards (Load FC_i of (Key (Picked unit)) from FC_Hashtable) degrees)










Unité - Make (Load (FC_i + 3) of (Key (Picked unit)) in FC_Hashtable) face (Load FC_i of (Key (Picked unit)) from FC_Hashtable) over 0.00 seconds










Set FC_X = (X of FC_TmpPoint2)










Set FC_Y = (Y of FC_TmpPoint2)










Custom script: call SetUnitX( LoadUnitHandle( udg_FC_Hashtable, GetHandleId( GetEnumUnit() ),(udg_FC_i + 3) ), udg_FC_X )










Custom script: call SetUnitY( LoadUnitHandle( udg_FC_Hashtable, GetHandleId( GetEnumUnit() ),(udg_FC_i + 3) ), udg_FC_Y )










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











Si - Conditions












FC_BetterFPS Egal à FALSE











Alors - Actions












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













Si - Conditions














(Load (Key Effecttimer) of (Key (Picked unit)) from FC_Hashtable) Supérieur à 0.00













Alors - Actions














Set FC_Effect_Timer_Instance = ((Load (Key Effecttimer) of (Key (Picked unit)) from FC_Hashtable) - 0.03)














Table de hachage - Save FC_Effect_Timer_Instance as (Key Effecttimer) of (Key (Picked unit)) in FC_Hashtable













Sinon - Actions














Set FC_Effect_Timer_Instance = FC_Effect_Timer














Table de hachage - Save FC_Effect_Timer_Instance as (Key Effecttimer) of (Key (Picked unit)) in FC_Hashtable














Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX














Effet spécial - Destroy (Last created special effect)











Sinon - Actions










Custom script: call RemoveLocation(udg_FC_TmpPoint2)








-------- Clearing the leaks of points --------








Custom script: call RemoveLocation(udg_FC_TmpPoint)







Sinon - Actions








-------- Removing all dummies --------








For each (Integer FC_i2) from 1 to 3, do (Actions)









Boucle - Actions










Set FC_TmpPoint2 = (Position of (Load (FC_i + 3) of (Key (Picked unit)) in FC_Hashtable))










Unité - Remove (Load (FC_i2 + 3) of (Key (Picked unit)) in FC_Hashtable) from the game










Custom script: call RemoveLocation(udg_FC_TmpPoint2)








Table de hachage - Clear all child hashtables of child (Key (Picked unit)) in FC_Hashtable








Set FC_TmpHandleDummy = (Picked unit)








Groupe unité - Remove FC_TmpHandleDummy from FC_Group








Unité - Remove FC_TmpHandleDummy from the game








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









Si - Conditions










(Number of units in FC_Group) Egal à 0









Alors - Actions










Déclencheur - Turn off (This trigger)










Déclencheur - Turn off Fire Circle Damage <gen>









Sinon - Actions








Custom script: set udg_FC_TmpHandleDummy = null





Sinon - Actions






-------- Removing all dummies --------






For each (Integer FC_i2) from 1 to 3, do (Actions)







Boucle - Actions








Unité - Remove (Load (FC_i2 + 3) of (Key (Picked unit)) in FC_Hashtable) from the game






Table de hachage - Clear all child hashtables of child (Key (Picked unit)) in FC_Hashtable






Set FC_TmpHandleDummy = (Picked unit)






Groupe unité - Remove FC_TmpHandleDummy from FC_Group






Unité - Remove FC_TmpHandleDummy from the game






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







Si - Conditions








(Number of units in FC_Group) Egal à 0







Alors - Actions








Déclencheur - Turn off (This trigger)








Déclencheur - Turn off Fire Circle Damage <gen>







Sinon - Actions






Custom script: set udg_FC_TmpHandleDummy = null
Fire Circle Damage

Evénements


Temps - Every 0.33 seconds of game time

Conditions

Actions


Groupe unité - Pick every unit in FC_Group and do (Actions)



Boucle - Actions




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





Si - Conditions






((Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable) is alive) Egal à TRUE





Alors - Actions






Set FC_TmpHandle = (Picked unit)






For each (Integer FC_i3) from 1 to 3, do (Actions)







Boucle - Actions








Set FC_TmpPoint2 = (Position of (Load (FC_i3 + 3) of (Key (Picked unit)) in FC_Hashtable))








-------- Checking if the spell can deal critical damage and rolling if the damages will be critical or not --------








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









Si - Conditions










FC_Critical Egal à TRUE









Alors - Actions










Set FC_TmpInt = ((Integer(FC_CriticalChanceBase)) + ((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable) x (Integer(FC_CriticalChanceLvl))))










Set FC_TmpInt2 = (Random integer number between 1 and 100)










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











Si - Conditions












FC_TmpInt2 Inférieur ou égal à FC_TmpInt











Alors - Actions












Set FC_Damage = (FC_Damage x FC_CriticalMultiplier)











Sinon - Actions












Set FC_Damage = (FC_Base_Damage + (FC_Level_Damage x (Real((Level of FC_Ability for (Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable))))))









Sinon - Actions










Set FC_Damage = (FC_Base_Damage + (FC_Level_Damage x (Real((Level of FC_Ability for (Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable))))))








Table de hachage - Save FC_Damage as (Key Damage) of FC_TmpInt in FC_Hashtable








-------- Checking if the spell can destroy trees and if it can then destroy the trees --------








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









Si - Conditions










FC_DestroyTrees Egal à TRUE









Alors - Actions










Destructible - Pick every destructible within (FC_RangeofDamageTreesBase + (FC_RangeofDamageTreesLevel x (Real((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable))))) of FC_TmpPoint2 and do (Actions)











Boucle - Actions












Set FC_Destructable = (Picked destructible)












Unité - Order FC_TreeRemover to Récolter FC_Destructable












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













Si - Conditions














(Current order of FC_TreeRemover) Egal à (Order(harvest))














(FC_Destructable is alive) Egal à TRUE













Alors - Actions














Set FC_TmpPoint = (Position of FC_Destructable)














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















Si - Conditions
















FC_BetterFPS Egal à FALSE















Alors - Actions
















Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX
















Effet spécial - Destroy (Last created special effect)















Sinon - Actions














Destructible - Kill FC_Destructable














Custom script: call RemoveLocation(udg_FC_TmpPoint)













Sinon - Actions












Unité - Order FC_TreeRemover to Arrêter









Sinon - Actions








-------- Damaging all units --------








Custom script: set bj_wantDestroyGroup = true








Groupe unité - Pick every unit in (Units within (FC_RangeofDamageBase + (FC_RangeofDamageLevel x (Real((Load (Key Abilitylevel) of FC_TmpInt from FC_Hashtable))))) of FC_TmpPoint2 matching (((Matching unit) has buff FC_Buff) Egal à TRUE)) and do (Actions)









Boucle - Actions










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











Si - Conditions












Or - Any (Conditions) are true













Conditions














((Picked unit) is Un bâtiment) Egal à FC_Damage_Building














((Picked unit) is Une unité volante) Egal à FC_Damage_Air














((Picked unit) is Un héros) Egal à FC_Damage_Heroes














((Picked unit) is Mécanique) Egal à FC_Damage_Mechanical














((Picked unit) is Insensible à la magie) Egal à FC_Damage_Immune














((Picked unit) is Une unité terrestre) Egal à FC_Damage_Ground











Alors - Actions












Set FC_TmpPoint = (Position of (Picked unit))












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













Si - Conditions














FC_BetterFPS Egal à FALSE













Alors - Actions














Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX














Effet spécial - Destroy (Last created special effect)













Sinon - Actions












Unité - Cause (Load (Key Caster) of (Key FC_TmpHandle) in FC_Hashtable) to damage (Picked unit), dealing (Load (Key Damage) of (Key (Picked unit)) from FC_Hashtable) damage of attack type FC_Attack_Type and damage type FC_Damage_Type












Custom script: call RemoveLocation(udg_FC_TmpPoint)











Sinon - Actions








-------- Clearing the leaks of the points --------








Custom script: call RemoveLocation(udg_FC_TmpPoint2)






-------- clearing the leak of the handle --------






Custom script: set udg_FC_TmpHandle = null





Sinon - Actions