Moderator
M
Moderator
23:09, 16th Jul 2013
Magtheridon96: Approved.
Magtheridon96: Approved.
AgileConfig

Events


Map initialization

Conditions

Actions


-------- //////////////////////////////////////////////////////////////////////// --------


-------- You can modify the integers here --------


-------- To get how much time is used for the spell, multiply RTime by the level of the ability. --------


-------- Also, to get the amount of agility, multiply RAmount by the level of the ability. --------


-------- It is simple: --------


-------- Time = RTime x Level of the Ability being cast --------


-------- Agility = RAmount x Level of the Ability being cast --------


-------- //////////////////////////////////////////////////////////////////////// --------


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


Set AgileAbility = Agile


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


Set AgileRTime = 3


Set AgileRAmount = 50


Set AgileDamagePercent = 4.00


Set AgileDamageSize = 300


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


Set AgileSFX1 = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl


Set AgileSFX1_AP = origin


Set AgileSFX2 = Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl


Set AgileSFX2_AP = overhead


Set AgileSFX3 = Abilities\Weapons\GlaiveMissile\GlaiveMissileTarget.mdl


Set AgileSFX3_Ap = origin


-------- //////////////////////////////////////////////////////////////////////// --------


-------- Divide the given agility by the DamagePercent to get the damage dealt to the sorrounding melee units --------


-------- Damage size is the Area of Effect multiplied by the level of the level of Agile --------


-------- //////////////////////////////////////////////////////////////////////// --------
AgileAbilityCast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to AgileAbility

Actions


-------- //////////////////////////////////////////////////////////////////////// --------


-------- Do not modify anything found below --------


-------- //////////////////////////////////////////////////////////////////////// --------


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


-------- counting how many are using the ability --------


Set Agileindex_size = (Agileindex_size + 1)


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


-------- indexing --------


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



If - Conditions




Agileindex_size Greater than Agileindex_max_size



Then - Actions




Set Agileindex[Agileindex_size] = Agileindex_size




Set Agileindex_max_size = Agileindex_size



Else - Actions


Set AgileInteger = Agileindex[Agileindex_size]


-------- done indexing --------


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


-------- setting for the arrays --------


Set AgileCasters[AgileInteger] = (Triggering unit)


Set AgileLevel = (Level of Agile for AgileCasters[AgileInteger])


Set AgileAmount[AgileInteger] = (AgileRAmount x AgileLevel)


Set AgileTime[AgileInteger] = (AgileRTime x AgileLevel)


Set AgileDamage = (AgileAmount[AgileInteger] / 4)


Set Agile_AoE = ((Real(AgileDamageSize)) x (Real((Level of Agile for AgileCasters[AgileInteger]))))


Set AgileDamageArea = (Position of AgileCasters[AgileInteger])


Set AgileDamageEnemy = (Units within Agile_AoE of AgileDamageArea matching ((((Matching unit) belongs to an enemy of (Owner of AgileCasters[AgileInteger])) Equal to True) and (((Matching unit) is A melee attacker) Equal to True)))


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


-------- The ability is given here --------


Hero - Modify Agility of AgileCasters[AgileInteger]: Add AgileAmount[AgileInteger]


-------- additional 1/4 damage take from the given agility. --------


Unit Group - Pick every unit in AgileDamageEnemy and do (Actions)



Loop - Actions




Set AgileEnemies = (Picked unit)




Unit - Cause AgileCasters[AgileInteger] to damage AgileEnemies, dealing (Real(AgileDamage)) damage of attack type Spells and damage type Normal




Special Effect - Create a special effect attached to the AgileSFX3_Ap of AgileEnemies using AgileSFX3




Special Effect - Destroy (Last created special effect)


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


-------- Also giving some special effects --------


Special Effect - Create a special effect attached to the AgileSFX1_AP of AgileCasters[AgileInteger] using AgileSFX1


Special Effect - Destroy (Last created special effect)


Special Effect - Create a special effect attached to the AgileSFX2_AP of AgileCasters[AgileInteger] using AgileSFX2


Set AgileCasterSE[AgileInteger] = (Last created special effect)


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


Custom script: call RemoveLocation(udg_AgileDamageArea)


Custom script: call DestroyGroup(udg_AgileDamageEnemy)


-------- turning on the cast time --------


Trigger - Turn on AgileTime <gen>


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


-------- //////////////////////////////////////////////////////////////////////// --------
AgileTime

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


-------- //////////////////////////////////////////////////////////////////////// --------


-------- Do not modify anything found below --------


-------- //////////////////////////////////////////////////////////////////////// --------


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


For each (Integer AgileLoop) from 1 to Agileindex_size, do (Actions)



Loop - Actions




Set AgileInteger = Agileindex[AgileLoop]




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





If - Conditions






AgileTime[AgileInteger] Greater than 0





Then - Actions






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







If - Conditions








(AgileCasters[AgileInteger] is dead) Equal to True







Then - Actions








Hero - Modify Agility of AgileCasters[AgileInteger]: Subtract AgileAmount[AgileInteger]








Special Effect - Destroy AgileCasterSE[AgileInteger]








Set Agileindex[AgileLoop] = Agileindex[Agileindex_size]








Set Agileindex[Agileindex_size] = AgileInteger








Set Agileindex_size = (Agileindex_size - 1)








Set AgileLoop = (AgileLoop - 1)








If (Agileindex_size Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)







Else - Actions








Set AgileTime[AgileInteger] = (AgileTime[AgileInteger] - 1)





Else - Actions






-------- giving back the original Agility to the caster --------






Hero - Modify Agility of AgileCasters[AgileInteger]: Subtract AgileAmount[AgileInteger]






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






-------- needs to destroy its Special Effects --------






Special Effect - Destroy AgileCasterSE[AgileInteger]






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






-------- recycling --------






Set Agileindex[AgileLoop] = Agileindex[Agileindex_size]






Set Agileindex[Agileindex_size] = AgileInteger






Set Agileindex_size = (Agileindex_size - 1)






Set AgileLoop = (AgileLoop - 1)






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






-------- trigger shut off --------






If (Agileindex_size Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)






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


-------- //////////////////////////////////////////////////////////////////////// --------