Moderator
M
Configuration

Events


Map initialization

Conditions

Actions


-------- The ability --------


Set Cnfg_TS_Ability = Torrent Slash


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


-------- Angle Reduction of the four blades. --------


Set Cnfg_TS_AngleRed = 6.20


-------- The number of blades created --------


Set Cnfg_TS_Blades = 6


-------- Damage of the Blades --------


Set Cnfg_TS_BladeDamage[1] = 25.00


Set Cnfg_TS_BladeDamage[2] = 32.00


Set Cnfg_TS_BladeDamage[3] = 40.00


-------- How far the blades can damage units --------


Set Cnfg_TS_BladeDamageRange = 66.66


Set Cnfg_TS_BladeModel = Abilities\Weapons\BloodElfSpellThiefMISSILE\BloodElfSpellThiefMISSILE.mdl


-------- The model of the blood --------


Set Cnfg_TS_BladeHitEffect = BloodSplatTiny.mdx


-------- The size of the blade in percentage --------


Set Cnfg_TS_BladeSize = 150.00


-------- Speed --------


Set Cnfg_TS_BladeSpeed = 60.00


-------- The degrees between each blade creation. If you want a circle, divide 360 by the number of blades. --------


Set Cnfg_TS_DegreesPerArray = 60.00


-------- Circumference of the blade spawn --------


Set Cnfg_TS_DistancePerBlades = 500.00


Set Cnfg_TS_DistancePerBlades = (Cnfg_TS_DistancePerBlades / 2.00)


-------- How long each blade lasts --------


Set Cnfg_TS_DurationMax = 2.22


-------- Every other blade receives a decrease in speed, but increase in lifetime. Decimal % --------


-------- Warning: Never set to 0.00. --------


Set Cnfg_TS_LayerDiff = 1.50
Torrent Slash

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Cnfg_TS_Ability

Actions


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



If - Conditions




TS_MaxIndex Equal to 0



Then - Actions




Trigger - Turn on Torrent Slash Loop <gen>



Else - Actions


Set OffsetLoc = (Position of (Triggering unit))


Set TempInteger = 1


-------- Blades --------


For each (Integer TempIndex) from 1 to Cnfg_TS_Blades, do (Actions)



Loop - Actions




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




Set TS_MaxIndex = (TS_MaxIndex + 1)




-------- Cache caster --------




Set TS_Caster[TS_MaxIndex] = (Triggering unit)




Set TS_Damage[TS_MaxIndex] = Cnfg_TS_BladeDamage[(Level of Cnfg_TS_Ability for TS_Caster[TS_MaxIndex])]




-------- Angle/Duration/Speed --------




Set TS_Duration[TS_MaxIndex] = Cnfg_TS_DurationMax




Set TS_Speed[TS_MaxIndex] = Cnfg_TS_BladeSpeed




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





If - Conditions






TempInteger Equal to 1





Then - Actions






Set TempInteger = 0





Else - Actions






Set TempInteger = 1






-------- Wild One! --------






Set TS_Duration[TS_MaxIndex] = (TS_Duration[TS_MaxIndex] x Cnfg_TS_LayerDiff)






Set TS_Speed[TS_MaxIndex] = (TS_Speed[TS_MaxIndex] - (TS_Speed[TS_MaxIndex] / Cnfg_TS_LayerDiff))




-------- Player --------




Set TS_Player[TS_MaxIndex] = (Owner of TS_Caster[TS_MaxIndex])




Set TempReal = (Cnfg_TS_DegreesPerArray x (Real(TempIndex)))




Set TS_BladeDegree[TS_MaxIndex] = TempReal




Set TempPoint = (OffsetLoc offset by Cnfg_TS_DistancePerBlades towards TempReal degrees)




Unit - Create 1 Dummy for TS_Player[TS_MaxIndex] at TempPoint facing TS_BladeDegree[TS_MaxIndex] degrees




Custom script: set udg_TS_Blade[udg_TS_MaxIndex] = bj_lastCreatedUnit




Unit - Add a TS_Duration[TS_MaxIndex] second Generic expiration timer to TS_Blade[TS_MaxIndex]




Animation - Change TS_Blade[TS_MaxIndex]'s size to (Cnfg_TS_BladeSize%, 0.00%, 0.00%) of its original size




Special Effect - Create a special effect attached to the chest of TS_Blade[TS_MaxIndex] using Cnfg_TS_BladeModel




Set TS_BladeEffect[TS_MaxIndex] = (Last created special effect)




Custom script: call RemoveLocation(udg_TempPoint)


Custom script: call RemoveLocation(udg_OffsetLoc)
Torrent Slash Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer TempIndex) from 1 to TS_MaxIndex, do (Actions)



Loop - Actions




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





If - Conditions






TS_Duration[TempIndex] Greater than 0.00





Then - Actions






Set TS_Duration[TempIndex] = (TS_Duration[TempIndex] - 0.03)






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







If - Conditions








(TS_Blade[TempIndex] is alive) Equal to True







Then - Actions








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








Set TempPoint = (Position of TS_Blade[TempIndex])








Set TS_BladeDegree[TempIndex] = (TS_BladeDegree[TempIndex] - Cnfg_TS_AngleRed)








Set OffsetLoc = (TempPoint offset by TS_Speed[TempIndex] towards TS_BladeDegree[TempIndex] degrees)








Custom script: call RemoveLocation(udg_TempPoint)








Unit - Move TS_Blade[TempIndex] instantly to OffsetLoc, facing TS_BladeDegree[TempIndex] degrees








-------- Damage Group --------








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within Cnfg_TS_BladeDamageRange of OffsetLoc) and do (Actions)









Loop - Actions










Set TempUnit = (Picked unit)










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











If - Conditions












(Life of TempUnit) Greater than 0.41












(TempUnit belongs to an enemy of TS_Player[TempIndex]) Equal to True











Then - Actions












Unit - Cause TS_Caster[TempIndex] to damage TempUnit, dealing TS_Damage[TempIndex] damage of attack type Spells and damage type Universal












Special Effect - Create a special effect attached to the chest of TempUnit using Cnfg_TS_BladeHitEffect












Special Effect - Destroy (Last created special effect)











Else - Actions








Custom script: call RemoveLocation(udg_OffsetLoc)







Else - Actions





Else - Actions






-------- Leak Removal --------






Custom script: call DestroyEffect(udg_TS_BladeEffect[udg_TempIndex])






-------- Here, we replace the CurrentIndex with the Max. --------






Set TS_Blade[TempIndex] = TS_Blade[TS_MaxIndex]






Set TS_BladeDegree[TempIndex] = TS_BladeDegree[TS_MaxIndex]






Set TS_BladeEffect[TempIndex] = TS_BladeEffect[TS_MaxIndex]






Set TS_Caster[TempIndex] = TS_Caster[TS_MaxIndex]






Set TS_Damage[TempIndex] = TS_Damage[TS_MaxIndex]






Set TS_Duration[TempIndex] = TS_Duration[TS_MaxIndex]






Set TS_Speed[TempIndex] = TS_Speed[TS_MaxIndex]






Set TS_MaxIndex = (TS_MaxIndex - 1)






Set TempIndex = (TempIndex - 1)






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







If - Conditions








TS_MaxIndex Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions






Custom script: set udg_TempUnit = null