- Joined
- Jun 16, 2012
- Messages
- 25
Hoh boi o boi cant wait for that juicy criticism because I never wanted to stop makin this pack
function DashingSteelInit takes nothing returns nothing
set udg_DS_Hash = InitHashtable()
// ------Configs-------
// The Ability's ID, in this case its A000
// To find it, go to the object editor click View > Display Values as Raw Data
set udg_DS_Ability = 'A000'
// Dummy, the dummy's ID in this case it's h003
// To find it, go to the object editor click View > Display Values as Raw Data
set udg_DS_Dummy = 'h003'
// Model of the ^ above, or the missile that is thrown when DashCount stacks are full.
set udg_DS_MissileModel = "Abilities\\Spells\\Other\\Tornado\\TornadoElementalSmall.mdl"
// attachment point of the missile above.
set udg_DS_DummyAttachment = "origin"
// Size of ^ above, in percentage of original size of the effect.
set udg_DS_ModelSize = 125.00
// Red 1-100 of dummy
set udg_DS_ModelColoring[1] = 45.00
// Green 1-100 of dummy
set udg_DS_ModelColoring[2] = 45.00
// Blue 1-100 of dummy
set udg_DS_ModelColoring[3] = 100.00
// Transparency 1-100 of dummy
set udg_DS_ModelColoring[4] = 0.00
// Distance every iteration
set udg_DS_DashSpeed = 25.00
set udg_DS_TornadoSpeed = 18.00
// Make sure to change cast range respectively in the object editor
// to the same as TornadoTravelDist
set udg_DS_TornadoTravelDist = 875.00
set udg_DS_MaxDashDistance = 395.00
// --------------------
set udg_DS_Animation = "attack"
set udg_DS_EndAnimationSpeed = 200.00
// --------------------
set udg_DS_CasterEffect = "Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl"
set udg_DS_TargetEffect = "Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl"
set udg_DS_DashEffect = "Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl"
set udg_DS_CasterEffectAttachment = "overhead"
set udg_DS_TargetEffectAttachment = "origin"
// Damage per level
set udg_DS_Damage[1] = 55.00
set udg_DS_Damage[2] = 75.00
set udg_DS_Damage[3] = 95.00
// How much damage the tornado does per level, 1 = same damage as dash.
set udg_DS_TornadoMultiplier[1] = 2.00
set udg_DS_TornadoMultiplier[2] = 2.00
set udg_DS_TornadoMultiplier[3] = 2.00
// Damage and Attack types
set udg_DS_AttackType = ATTACK_TYPE_HERO
set udg_DS_DamageType = DAMAGE_TYPE_NORMAL
// ---Damage Range-----
set udg_DS_DRange = 225.00
set udg_DS_NadoKnockupRange = 155.00
//Determines how many dashes until you get a tornado
set udg_DS_DashCountMax[1] = 2
set udg_DS_DashCountMax[2] = 2
set udg_DS_DashCountMax[3] = 2
// --EndConfig---------
set udg_DS_DashCount = 0
endfunction
//===========================================================================
function InitTrig_DashingSteelInit takes nothing returns nothing
set gg_trg_DashingSteelInit = CreateTrigger( )
call TriggerAddAction( gg_trg_DashingSteelInit, function DashingSteelInit )
endfunction
DashingSteel

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to DS_Ability

Actions


Set DS_Caster = (Triggering unit)


Custom script: set udg_DS_CasterKey = GetHandleId(udg_DS_Caster)


Set DS_Owner = (Triggering player)


Set DS_CasterLoc = (Position of DS_Caster)


Set DS_TargetLoc = (Target point of ability being cast)


Set DS_Level = (Level of DS_Ability for DS_Caster)


Set DS_CurrentAngle = (Angle from DS_CasterLoc to DS_TargetLoc)


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



If - Conditions




(Distance between DS_CasterLoc and DS_TargetLoc) Less than DS_MaxDashDistance



Then - Actions




Set DS_CurrentDistance = (Distance between DS_CasterLoc and DS_TargetLoc)



Else - Actions




Set DS_CurrentDistance = DS_MaxDashDistance


Set DS_DashCount = (Load (Key dashcount) of DS_UnitKey from DS_Hash)


Hashtable - Save DS_Level as (Key level) of DS_CasterKey in DS_Hash


Hashtable - Save DS_CurrentAngle as (Key angle) of DS_CasterKey in DS_Hash


Hashtable - Save DS_DashCount as (Key dashcount) of DS_UnitKey in DS_Hash


Hashtable - Save DS_CurrentDistance as (Key distance) of DS_CasterKey in DS_Hash


Unit Group - Add DS_Caster to DS_LoopGroup


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



If - Conditions




(DashingSteelLoop <gen> is on) Equal to False



Then - Actions




Trigger - Turn on DashingSteelLoop <gen>



Else - Actions


Custom script: call RemoveLocation(udg_DS_CasterLoc)


Custom script: call RemoveLocation(udg_DS_TargetLoc)
DashingSteelLoop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




Set DS_Unit = (Picked unit)




Custom script: set udg_DS_UnitKey = GetHandleId(udg_DS_Unit)




Set DS_Owner = (Owner of DS_Unit)




Unit - Turn collision for DS_Unit Off




Set DS_CurrentDistance = (Load (Key distance) of DS_UnitKey from DS_Hash)




Set DS_CurrentAngle = (Load (Key angle) of DS_UnitKey from DS_Hash)




Set DS_Level = (Load (Key level) of DS_UnitKey from DS_Hash)




Set DS_DashCount = (Load (Key dashcount) of DS_UnitKey from DS_Hash)




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





If - Conditions






DS_DashCount Equal to DS_DashCountMax[DS_Level]





Then - Actions






Unit Group - Remove DS_Unit from DS_LoopGroup






Unit - Turn collision for DS_Unit On






Animation - Play DS_Unit's DS_Animation animation






Set DS_UnitLoc = (Position of DS_Unit)






Set DS_Level = (Level of DS_Ability for DS_Unit)






Hashtable - Clear all child hashtables of child DS_UnitKey in DS_Hash






Unit - Create 1 DS_Dummy for DS_Owner at DS_UnitLoc facing DS_CurrentAngle degrees






Set DS_Unit = (Last created unit)






Custom script: set udg_DS_UnitKey = GetHandleId(udg_DS_Unit)






Custom script: call RemoveLocation(udg_DS_UnitLoc)






Special Effect - Create a special effect attached to the DS_DummyAttachment of DS_Unit using DS_MissileModel






Set DS_Effect = (Last created special effect)






Animation - Change DS_Unit's size to (DS_ModelSize%, DS_ModelSize%, DS_ModelSize%) of its original size






Animation - Change DS_Unit's vertex coloring to (DS_ModelColoring[1]%, DS_ModelColoring[2]%, DS_ModelColoring[3]%) with DS_ModelColoring[4]% transparency






Set DS_Speed = DS_TornadoSpeed






Set DS_CurrentDistance = DS_TornadoTravelDist






Set DS_DashCount = 0






Set DS_CurrentAngle = DS_CurrentAngle






Hashtable - Save Handle OfDS_Effect as (Key effect) of DS_UnitKey in DS_Hash






Hashtable - Save DS_Level as (Key level) of DS_UnitKey in DS_Hash






Hashtable - Save DS_CurrentAngle as (Key angle) of DS_UnitKey in DS_Hash






Hashtable - Save DS_CurrentDistance as (Key distance) of DS_UnitKey in DS_Hash






Hashtable - Save DS_DashCount as (Key dashcount) of DS_UnitKey in DS_Hash






Unit Group - Add DS_Unit to DS_LoopGroup





Else - Actions




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





If - Conditions






DS_CurrentDistance Greater than 0.00





Then - Actions






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







If - Conditions








(DS_Unit is alive) Equal to True







Then - Actions








Set DS_UnitLoc = (Position of DS_Unit)








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









If - Conditions










(Unit-type of DS_Unit) Equal to DS_Dummy









Then - Actions










Set DS_Offset = (DS_UnitLoc offset by DS_TornadoSpeed towards DS_CurrentAngle degrees)










Unit - Move DS_Unit instantly to DS_Offset










Special Effect - Create a special effect at DS_Offset using DS_DashEffect










Special Effect - Destroy (Last created special effect)










Custom script: set bj_wantDestroyGroup = true










Unit Group - Pick every unit in (Units within DS_NadoKnockupRange of DS_UnitLoc) and do (Actions)











Loop - Actions












Set DS_Picked = (Picked unit)












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













If - Conditions














(DS_Picked is in DS_NadoGroup) Equal to False














(DS_Picked is A structure) Equal to False














(DS_Picked is alive) Equal to True














(DS_Picked belongs to an enemy of DS_Owner) Equal to True













Then - Actions














Unit Group - Add DS_Picked to DS_NadoGroup














Unit - Cause DS_Unit to damage DS_Picked, dealing (DS_Damage[DS_Level] x DS_TornadoMultiplier[DS_Level]) damage of attack type DS_AttackType and damage type DS_DamageType














Special Effect - Create a special effect attached to the DS_TargetEffectAttachment of DS_Picked using DS_TargetEffect














Special Effect - Destroy (Last created special effect)














Set KUS_target = DS_Picked














Trigger - Run prepare <gen> (checking conditions)













Else - Actions










Set DS_CurrentDistance = (DS_CurrentDistance - DS_TornadoSpeed)









Else - Actions










Set DS_Offset = (DS_UnitLoc offset by DS_DashSpeed towards DS_CurrentAngle degrees)










Unit - Move DS_Unit instantly to DS_Offset










Special Effect - Create a special effect at DS_Offset using DS_DashEffect










Special Effect - Destroy (Last created special effect)










Set DS_CurrentDistance = (DS_CurrentDistance - DS_DashSpeed)








Custom script: call RemoveLocation(udg_DS_Offset)








Custom script: call RemoveLocation(udg_DS_UnitLoc)








Hashtable - Save DS_CurrentDistance as (Key distance) of DS_UnitKey in DS_Hash







Else - Actions








Hashtable - Clear all child hashtables of child DS_UnitKey in DS_Hash








Unit Group - Remove DS_Unit from DS_LoopGroup








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









If - Conditions










(DS_LoopGroup is empty) Equal to True









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions





Else - Actions






Set DS_UnitLoc = (Position of DS_Unit)






Unit - Turn collision for DS_Unit On






Animation - Change DS_Unit's animation speed to DS_EndAnimationSpeed% of its original speed






Animation - Play DS_Unit's DS_Animation animation






Special Effect - Create a special effect attached to the DS_CasterEffectAttachment of DS_Unit using DS_CasterEffect






Special Effect - Destroy (Last created special effect)






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







If - Conditions








(Unit-type of DS_Unit) Equal to DS_Dummy







Then - Actions








Animation - Change DS_Unit's animation speed to 100.00% of its original speed








Unit - Add a 1.00 second Generic expiration timer to DS_Unit








Unit Group - Remove all units from DS_NadoGroup








Set DS_Effect = (Load (Key effect) of DS_UnitKey in DS_Hash)








Special Effect - Destroy DS_Effect








Hashtable - Clear all child hashtables of child DS_UnitKey in DS_Hash








Set DS_Hit = True







Else - Actions








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within DS_DRange of DS_UnitLoc) and do (Actions)









Loop - Actions










Set DS_Picked = (Picked unit)










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











If - Conditions












(DS_Picked is A structure) Equal to False












(DS_Picked is alive) Equal to True












(DS_Picked belongs to an enemy of DS_Owner) Equal to True











Then - Actions












Set DS_Hit = True












Unit - Make DS_Unit face DS_Picked over 0.00 seconds












Unit - Cause DS_Unit to damage DS_Picked, dealing DS_Damage[DS_Level] damage of attack type DS_AttackType and damage type DS_DamageType












Special Effect - Create a special effect attached to the DS_TargetEffectAttachment of DS_Picked using DS_TargetEffect












Special Effect - Destroy (Last created special effect)











Else - Actions






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







If - Conditions








DS_Hit Equal to True







Then - Actions








Set DS_DashCount = (DS_DashCount + 1)







Else - Actions






Set DS_Hit = False






Hashtable - Save DS_DashCount as (Key dashcount) of DS_UnitKey in DS_Hash






Custom script: call RemoveLocation(udg_DS_UnitLoc)






Unit Group - Remove DS_Unit from DS_LoopGroup






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







If - Conditions








(DS_LoopGroup is empty) Equal to True







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions
function GSInit takes nothing returns nothing
set udg_TMP_Hash = InitHashtable()
// -------Configs--------
// How fast is the loop trigger?
set udg_TMP_LoopTimer = 0.03
// The Ability's ID, in this case it's A004
// To find it, go to the object editor click View > Display Values as Raw Data
set udg_TMP_Ability = 'A004'
// Dummy, the dummy's ID in this case it's h003
// To find it, go to the object editor click View > Display Values as Raw Data
set udg_TMP_Dummy = 'h003'
// Model of the spinning units
set udg_TMP_SpinModel = "Abilities\\Spells\\Other\\Tornado\\TornadoElementalSmall.mdl"
// End effect
set udg_TMP_EndEffect = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
// Attachment point to the dummy.
set udg_TMP_DummyAttachment = "origin"
// Size of ^ above, in percentage of original size of the effect.
set udg_TMP_ModelSize = 60.00
// Red 1-100 of dummy
set udg_TMP_ModelColoring[1] = 45.00
// Green 1-100 of dummy
set udg_TMP_ModelColoring[2] = 45.00
// Blue 1-100 of dummy
set udg_TMP_ModelColoring[3] = 100.00
// Transparency 1-100 of dummy
set udg_TMP_ModelColoring[4] = 0.00
// Number of Tornadoes spinning
set udg_TMP_WindNumber = 12
// Degrees will be 360 divided by WindNumber so that it is evenly distributed
// However you may change it to anything you'd like
set udg_TMP_WindDegrees = ( 360.00 / I2R(udg_TMP_WindNumber) )
// The Starting Distance from the caster
set udg_TMP_WindDistance = 1.00
// End damage, for the damage during spinning go to the object editor spell
set udg_TMP_Damage[1] = 10.00
set udg_TMP_Damage[2] = 20.00
set udg_TMP_Damage[3] = 30.00
// ----------------
set udg_TMP_DamageType = DAMAGE_TYPE_NORMAL
set udg_TMP_AttackType = ATTACK_TYPE_HERO
// Range of knockup/end damage, the range of spin damage in the object editor
set udg_TMP_Range = 312.00
// --------------------
set udg_TMP_MinDistance = 150.00
// How far out the tornadoes will go
set udg_TMP_MaxDistance = 300.00
// Speed per iteration of the tornadoes going outward
set udg_TMP_WindBaseSpeed = 120.00
set udg_TMP_WindSpeed = ( udg_TMP_WindBaseSpeed * 0.04 )
// Spin speed per iteration of each tornado
set udg_TMP_SpinSpeed = ( 300.00 * 0.02 )
// Max time allowed for tornadoes to be going outward before they are forced
// to be at max distance
set udg_TMP_MaxWindTime = 2000.00
// Duration, also a duration in object editor
set udg_TMP_Duration[1] = 3.00
set udg_TMP_Duration[2] = 3.00
set udg_TMP_Duration[3] = 3.00
// Special Effect on each Wind, I wouldnt recommend using any at all it might lag a bit
set udg_TMP_WindSFX = ""
endfunction
//===========================================================================
function InitTrig_TempestInit takes nothing returns nothing
set gg_trg_TempestInit = CreateTrigger( )
call TriggerAddAction( gg_trg_TempestInit, function GSInit)
endfunction
Tempest

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to TMP_Ability

Actions


Set TMP_Caster = (Triggering unit)


Custom script: set udg_TMP_CasterKey = GetHandleId(udg_TMP_Caster)


Set TMP_CasterLoc = (Position of TMP_Caster)


Set TMP_Level = (Level of TMP_Ability for TMP_Caster)


Set TMP_Owner = (Triggering player)


For each (Integer TMP_TotalWinds) from 1 to TMP_WindNumber, do (Actions)



Loop - Actions




Set TMP_LastWinds[TMP_TotalWinds] = (Load TMP_TotalWinds of DS_CasterKey in TMP_Hash)




Unit - Kill TMP_LastWinds[TMP_TotalWinds]




Set TMP_CasterOffset = (TMP_CasterLoc offset by TMP_WindDistance towards ((Real(TMP_TotalWinds)) x TMP_WindDegrees) degrees)




Unit - Create 1 TMP_Dummy for TMP_Owner at TMP_CasterOffset facing Default building facing degrees




Set TMP_LastWinds[TMP_TotalWinds] = (Last created unit)




Unit - Add a TMP_Duration[TMP_Level] second Generic expiration timer to TMP_LastWinds[TMP_TotalWinds]




Special Effect - Create a special effect attached to the TMP_DummyAttachment of TMP_LastWinds[TMP_TotalWinds] using TMP_SpinModel




Set TMP_SpinEffect[TMP_TotalWinds] = (Last created special effect)




Animation - Change TMP_LastWinds[TMP_TotalWinds]'s size to (TMP_ModelSize%, TMP_ModelSize%, TMP_ModelSize%) of its original size




Animation - Change TMP_LastWinds[TMP_TotalWinds]'s vertex coloring to (TMP_ModelColoring[1]%, TMP_ModelColoring[2]%, TMP_ModelColoring[3]%) with TMP_ModelColoring[4]% transparency




Hashtable - Save Handle OfTMP_SpinEffect[TMP_TotalWinds] as (TMP_TotalWinds + TMP_WindNumber) of TMP_CasterKey in TMP_Hash




Hashtable - Save Handle OfTMP_LastWinds[TMP_TotalWinds] as TMP_TotalWinds of TMP_CasterKey in TMP_Hash




Custom script: call RemoveLocation(udg_TMP_CasterOffset)


Set TMP_CurrentDuration = 0.00


Set TMP_CurrentDistance = TMP_WindDistance


Hashtable - Save TMP_CurrentDuration as (Key duration) of TMP_CasterKey in TMP_Hash


Hashtable - Save TMP_Level as (Key level) of TMP_CasterKey in TMP_Hash


Hashtable - Save TMP_CurrentDistance as (Key distance]) of TMP_CasterKey in TMP_Hash


Unit Group - Add TMP_Caster to TMP_LoopGroup


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



If - Conditions




(TempestLoop <gen> is on) Equal to False



Then - Actions




Trigger - Turn on TempestLoop <gen>



Else - Actions


Custom script: call RemoveLocation(udg_TMP_CasterLoc)
TempestLoop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




Set TMP_Unit = (Picked unit)




Custom script: set udg_TMP_UnitKey = GetHandleId(udg_TMP_Unit)




Set TMP_Owner = (Owner of TMP_Unit)




Set TMP_CurrentDuration = (Load (Key duration) of TMP_UnitKey from TMP_Hash)




Set TMP_Level = (Load (Key level) of TMP_UnitKey from TMP_Hash)




For each (Integer TMP_TotalWinds) from 1 to TMP_WindNumber, do (Actions)





Loop - Actions






Set TMP_LastWinds[TMP_TotalWinds] = (Load TMP_TotalWinds of TMP_UnitKey in TMP_Hash)




Set TMP_CurrentDegrees = (Load (Key degrees) of TMP_UnitKey from TMP_Hash)




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





If - Conditions






TMP_CurrentDistance Less than TMP_MaxWindTime





Then - Actions






Set TMP_CurrentDistance = (Load (Key distance) of TMP_UnitKey from TMP_Hash)





Else - Actions






Set TMP_CurrentDistance = TMP_MaxDistance




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





If - Conditions






TMP_CurrentDuration Less than TMP_Duration[TMP_Level]





Then - Actions






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







If - Conditions








(TMP_Unit is alive) Equal to True







Then - Actions








Set TMP_UnitLoc = (Position of TMP_Unit)








For each (Integer TMP_TotalWinds) from 1 to TMP_WindNumber, do (Actions)









Loop - Actions










Set TMP_WindOffset = (TMP_UnitLoc offset by TMP_CurrentDistance towards (((Real(TMP_TotalWinds)) x TMP_WindDegrees) + TMP_CurrentDegrees) degrees)










Unit - Move TMP_LastWinds[TMP_TotalWinds] instantly to TMP_WindOffset










Special Effect - Create a special effect at TMP_WindOffset using TMP_WindSFX










Special Effect - Destroy (Last created special effect)










Custom script: call RemoveLocation(udg_TMP_WindOffset)








Hashtable - Save (TMP_CurrentDegrees + TMP_SpinSpeed) as (Key degrees) of TMP_UnitKey in TMP_Hash








Hashtable - Save (TMP_CurrentDuration + TMP_LoopTimer) as (Key duration) of TMP_UnitKey in TMP_Hash








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









If - Conditions










TMP_CurrentDistance Less than TMP_MaxDistance









Then - Actions










Hashtable - Save (TMP_CurrentDistance + TMP_WindSpeed) as (Key distance) of TMP_UnitKey in TMP_Hash









Else - Actions










Hashtable - Save TMP_MaxDistance as (Key distance) of TMP_UnitKey in TMP_Hash








Custom script: call RemoveLocation(udg_TMP_UnitLoc)







Else - Actions








Hashtable - Clear all child hashtables of child TMP_UnitKey in TMP_Hash








Unit Group - Remove TMP_Unit from TMP_LoopGroup








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









If - Conditions










(TMP_LoopGroup is empty) Equal to True









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions





Else - Actions






Set TMP_UnitLoc = (Position of TMP_Unit)






For each (Integer TMP_TotalWinds) from 1 to TMP_WindNumber, do (Actions)







Loop - Actions








Set TMP_SpinEffect[TMP_TotalWinds] = (Load (TMP_TotalWinds + TMP_WindNumber) of TMP_UnitKey in TMP_Hash)








Special Effect - Destroy TMP_SpinEffect[TMP_TotalWinds]






Unit - Create 1 TMP_Dummy for TMP_Owner at TMP_UnitLoc facing TMP_UnitLoc






Set TMP_Effect = (Last created unit)






Unit - Add a 1.00 second Generic expiration timer to TMP_Effect






Special Effect - Create a special effect attached to the TMP_DummyAttachment of TMP_Effect using TMP_EndEffect






Special Effect - Destroy (Last created special effect)






Custom script: set bj_wantDestroyGroup = true






Unit Group - Pick every unit in (Units within TMP_Range of TMP_UnitLoc) and do (Actions)







Loop - Actions








Set TMP_Picked = (Picked unit)








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









If - Conditions










(TMP_Picked is A structure) Equal to False










(TMP_Picked is alive) Equal to True










(TMP_Picked belongs to an enemy of TMP_Owner) Equal to True









Then - Actions










Unit - Cause TMP_Unit to damage TMP_Picked, dealing TMP_Damage[TMP_Level] damage of attack type TMP_AttackType and damage type TMP_DamageType










Set KUS_target = TMP_Picked










Trigger - Run prepare <gen> (checking conditions)









Else - Actions






Custom script: call RemoveLocation(udg_TMP_UnitLoc)






Hashtable - Clear all child hashtables of child TMP_UnitKey in TMP_Hash






Unit Group - Remove TMP_Unit from TMP_LoopGroup






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







If - Conditions








(TMP_LoopGroup is empty) Equal to True







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions
function WTinit takes nothing returns nothing
// The Ability's ID, in this case its A005
// To find it, go to the object editor click View > Display Values as Raw Data
set udg_WT_Ability = 'A005'
// ----Counter proc chance per level--------
set udg_WT_Chance[1] = 7
set udg_WT_Chance[2] = 9
set udg_WT_Chance[3] = 11
// -----Double strike proc chance per level-------
set udg_WT_ChanceStrike[1] = 15
set udg_WT_ChanceStrike[2] = 20
set udg_WT_ChanceStrike[3] = 25
// -----Counter damage per level-------
set udg_WT_Damage[1] = 100.00
set udg_WT_Damage[2] = 150.00
set udg_WT_Damage[3] = 200.00
// Counter's Animation
set udg_WT_CounterAnimation = "spin"
// -----Double Strike damage per level-------
set udg_WT_DamageStrike[1] = 15.00
set udg_WT_DamageStrike[2] = 25.00
set udg_WT_DamageStrike[3] = 35.00
// Attack and Damage type
set udg_WT_AttackType = ATTACK_TYPE_HERO
set udg_WT_DamageType = DAMAGE_TYPE_NORMAL
// Double Strike's Animation
set udg_WT_StrikeAnimation = "attack slam"
// -Counter Damage Range-------
set udg_WT_Radius = 250.00
// -----Counter Effects-------
// Caster effect
set udg_WT_EffectCaster = "Abilities\\Spells\\NightElf\\Taunt\\TauntCaster.mdl"
// Target Effect
set udg_WT_EffectTarget = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
// ------Double Strike Effects------
// Caster Effect
set udg_WT_SEffectCaster = "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl"
// Target Effect
set udg_WT_SEffectTarget = "Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl"
// Caster Effect Attachment Point
set udg_WT_EffectCasterAttachment = "origin"
// Target Effect Attachment Point
set udg_WT_EffectTargetAttachment = "origin"
endfunction
function InitTrig_WindTechniqueInit takes nothing returns nothing
set gg_trg_WindTechniqueInit = CreateTrigger( )
call TriggerAddAction( gg_trg_WindTechniqueInit, function WTinit )
endfunction
WindTechnique

Events


Game - DamageEvent becomes Equal to 1.00

Conditions

Actions


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


-------- Double Strike Portion --------


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


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



If - Conditions




(Level of WT_Ability for DamageEventSource) Greater than 0




(DamageEventSource is in TMP_LoopGroup) Equal to False




(DamageEventSource is in WT_CantProcTwice) Equal to False



Then - Actions




Set WT_Unit = DamageEventSource




Unit Group - Add WT_Unit to WT_CantProcTwice




Set WT_Striked = DamageEventTarget




Set WT_Level = (Level of WT_Ability for WT_Unit)




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




Set WT_DamageStrike2[WT_Level] = (DamageEventAmount + WT_DamageStrike[WT_Level])




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




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





If - Conditions






WT_Rand Less than or equal to WT_ChanceStrike[WT_Level]





Then - Actions






Animation - Play WT_Unit's WT_StrikeAnimation animation






Special Effect - Create a special effect attached to the WT_EffectCasterAttachment of WT_Unit using WT_SEffectCaster






Special Effect - Destroy (Last created special effect)






Unit - Cause WT_Unit to damage WT_Striked, dealing WT_DamageStrike2[WT_Level] damage of attack type WT_AttackType and damage type WT_DamageType






Special Effect - Create a special effect attached to the WT_EffectTargetAttachment of WT_Striked using WT_SEffectTarget






Special Effect - Destroy (Last created special effect)





Else - Actions




Unit Group - Remove all units from WT_CantProcTwice



Else - Actions


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


-------- Counter Portion --------


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


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



If - Conditions




(Level of WT_Ability for DamageEventTarget) Greater than 0




(DamageEventTarget is in TMP_LoopGroup) Equal to False




(DamageEventTarget is in WT_CantProcTwice) Equal to False




(DamageEventSource is alive) Equal to True



Then - Actions




Set WT_Unit = DamageEventTarget




Set WT_Striked = DamageEventSource




Set WT_Owner = (Owner of WT_Unit)




Set WT_CLoc = (Position of WT_Unit)




Set WT_Level = (Level of WT_Ability for WT_Unit)




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




Unit Group - Add WT_Unit to WT_CantProcTwice




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




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





If - Conditions






WT_Rand Less than or equal to WT_Chance[WT_Level]





Then - Actions






Animation - Play WT_Unit's WT_CounterAnimation animation






Special Effect - Create a special effect attached to the WT_EffectCasterAttachment of WT_Unit using WT_EffectCaster






Special Effect - Destroy (Last created special effect)






Set WT_Group = (Units within WT_Radius of WT_CLoc)






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







Loop - Actions








Set WT_Picked = (Picked unit)








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









If - Conditions










(WT_Picked is A structure) Equal to False










(WT_Picked is alive) Equal to True










(WT_Picked belongs to an enemy of WT_Owner) Equal to True









Then - Actions










Unit - Cause WT_Unit to damage WT_Picked, dealing WT_Damage[WT_Level] damage of attack type WT_AttackType and damage type WT_DamageType










Special Effect - Create a special effect attached to the WT_EffectTargetAttachment of WT_Picked using WT_EffectTarget










Special Effect - Destroy (Last created special effect)









Else - Actions






Custom script: call DestroyGroup ( udg_WT_Group )





Else - Actions




Unit Group - Remove all units from WT_CantProcTwice




Custom script: call RemoveLocation( udg_WT_CLoc )



Else - Actions
function LastBreathInit takes nothing returns nothing
set udg_LB_Hash = InitHashtable()
// How fast is the LastBreathLoop trigger?
set udg_LB_LoopSpeed = 0.03
// The Ability's ID, in this case its A001
// To find it, go to the object editor click View > Display Values as Raw Data
set udg_LB_Ability = 'A001'
//-------per level------------
set udg_LB_Damage[1] = 290.00
set udg_LB_Damage[2] = 365.00
// Damage and Attack type
set udg_LB_DamageType = DAMAGE_TYPE_NORMAL
set udg_LB_AttackType = ATTACK_TYPE_HERO
//----per level---------------
set udg_LB_Range[1] = 800.00
set udg_LB_Range[2] = 800.00
// How far away from the target during the 3 slashes, and the degree around the target
set udg_LB_DistanceFromTarget = 195.00
set udg_LB_Degrees = 0
// If you want degrees to be a random number set to true, if you want degrees to
// be one value, set to false when you change LB_Degrees
set udg_LB_Randomize = true
//During Last Breath the unit strikes 3 times, this is the animations.
set udg_LB_Animation[1] = "attack"
set udg_LB_Animation[2] = "attack"
set udg_LB_Animation[3] = "attack slam"
//--------------------
set udg_LB_CasterHeight = 300.00
//--------------------
//Teleport effect from original location
set udg_LB_EffectCaster = "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl"
//Teleport effect at new location
set udg_LB_EffectCaster2 = "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl"
// Attachment for the above effect
set udg_LB_CasterEffectAttachment ="origin"
// First impact effect
set udg_LB_TargetEffect[1] = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
// Attachment for the above effect
set udg_LB_TargetEffectAttachment[1] = "origin"
// Second impact effect
set udg_LB_TargetEffect[2] = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
// Attachment for the above effect
set udg_LB_TargetEffectAttachment[2] = "origin"
// Third impact effect
set udg_LB_TargetEffect[3] = "Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl"
// Attachment for the above effect
set udg_LB_TargetEffectAttachment[3] = "origin"
// Slam ending impact effect
set udg_LB_EffectTargetSlam = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
// Attachment for the above effect
set udg_LB_TargetEffectAttachment[4] = "origin"
//Time suspended in air per level.
set udg_LB_KnockDuration[1] = 1.00
set udg_LB_KnockDuration[2] = 1.00
//--------------------
set udg_LB_TargetHeight = 300.00
//How fast the units go back to the ground.
set udg_LB_SlamSpeedTarget = 600.00
set udg_LB_SlamSpeedCaster = 985.00
endfunction
//===========================================================================
function InitTrig_LastBreathInit takes nothing returns nothing
set gg_trg_LastBreathInit = CreateTrigger( )
call TriggerAddAction( gg_trg_LastBreathInit, function LastBreathInit )
endfunction
LastBreath

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to LB_Ability

Actions


Set LB_Caster = (Triggering unit)


Custom script: set udg_LB_CasterKey = GetHandleId( udg_LB_Caster )


Set LB_CasterLoc = (Position of LB_Caster)


Set LB_Owner = (Triggering player)


Set LB_Level = (Level of LB_Ability for LB_Caster)


Set LB_CurrentDuration = LB_KnockDuration[LB_Level]


-------- Prevents more than 1 "No units in range" text --------


Set LB_Check = False


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



If - Conditions




(Level of Crow Form for LB_Caster) Equal to 0



Then - Actions




Unit - Add Crow Form to LB_Caster




Unit - Remove Crow Form from LB_Caster



Else - Actions


Special Effect - Create a special effect at LB_CasterLoc using LB_EffectCaster


Special Effect - Destroy (Last created special effect)


Hashtable - Save LB_Level as (Key level) of LB_CasterKey in LB_Hash


Hashtable - Save LB_CurrentDuration as (Key duration) of LB_CasterKey in LB_Hash


Set LB_isKnockedUp = (Units within LB_Range[LB_Level] of LB_CasterLoc)


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



Loop - Actions




Set LB_Picked = (Picked unit)




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





If - Conditions






(LB_Picked is in KUS_group) Equal to True






(LB_Picked is A structure) Equal to False






(LB_Picked is alive) Equal to True






(LB_Picked belongs to an enemy of LB_Owner) Equal to True





Then - Actions






Set LB_Check = True





Else - Actions


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



If - Conditions




LB_Check Equal to True



Then - Actions




Unit - Pause LB_Caster




Unit Group - Add LB_Caster to LB_LoopGroup




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





If - Conditions






(LastBreathLoop <gen> is on) Equal to False





Then - Actions






Trigger - Turn on LastBreathLoop <gen>





Else - Actions



Else - Actions




Set LB_Player = (Player group(LB_Owner))




Game - Display to LB_Player for 3.00 seconds the text: |cff00ff00No knocke...




Custom script: call DestroyForce( udg_LB_Player )




Unit - Remove LB_Ability from LB_Caster




Unit - Add LB_Ability to LB_Caster




Unit - Set level of LB_Ability for LB_Caster to LB_Level


Custom script: call RemoveLocation( udg_LB_CasterLoc )


Custom script: call DestroyGroup( udg_LB_isKnockedUp )
LastBreathLoop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




Set LB_Unit = (Picked unit)




Custom script: set udg_LB_UnitKey = GetHandleId(udg_LB_Unit)




Set LB_Level = (Load (Key level) of LB_UnitKey from LB_Hash)




Set LB_CurrentDuration = (Load (Key duration) of LB_UnitKey from LB_Hash)




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





If - Conditions






LB_CurrentDuration Greater than 0.00





Then - Actions






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







If - Conditions








(LB_Unit is alive) Equal to True







Then - Actions








Set LB_UnitLoc = (Position of LB_Unit)








Set LB_isKnockedUp = (Units within LB_Range[LB_Level] of LB_UnitLoc)








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









Loop - Actions










Set LB_Picked = (Picked unit)










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











If - Conditions












(LB_Picked is in KUS_group) Equal to True












(LB_Picked is A structure) Equal to False












(LB_Picked is alive) Equal to True












(LB_Picked belongs to an enemy of LB_Owner) Equal to True











Then - Actions












Set LB_PickedLoc = (Position of LB_Picked)












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













If - Conditions














LB_CurrentDuration Equal to LB_KnockDuration[LB_Level]













Then - Actions














Animation - Change LB_Unit flying height to LB_CasterHeight at 0.00














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















If - Conditions
















LB_Randomize Equal to True















Then - Actions
















Set LB_Degrees = (Random real number between 0.00 and 360.00)















Else - Actions














Unit - Move LB_Unit instantly to (LB_PickedLoc offset by LB_DistanceFromTarget towards LB_Degrees degrees)














Unit - Make LB_Unit face LB_Picked over 0.00 seconds














Special Effect - Create a special effect attached to the LB_CasterEffectAttachment of LB_Unit using LB_EffectCaster2














Special Effect - Destroy (Last created special effect)














Special Effect - Create a special effect attached to the LB_TargetEffectAttachment[1] of LB_Picked using LB_TargetEffect[1]














Special Effect - Destroy (Last created special effect)














Animation - Reset LB_Unit's animation














Animation - Play LB_Unit's LB_Animation[1] animation













Else - Actions












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













If - Conditions














LB_CurrentDuration Equal to (LB_KnockDuration[LB_Level] - (LB_LoopSpeed x (LB_KnockDuration[LB_Level] x 16.00)))













Then - Actions














Special Effect - Create a special effect attached to the LB_TargetEffectAttachment[2] of LB_Picked using LB_TargetEffect[2]














Special Effect - Destroy (Last created special effect)














Animation - Reset LB_Unit's animation














Animation - Play LB_Unit's LB_Animation[2] animation













Else - Actions












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













If - Conditions














LB_CurrentDuration Equal to (LB_KnockDuration[LB_Level] - (LB_LoopSpeed x (LB_KnockDuration[LB_Level] x 29.00)))













Then - Actions














Special Effect - Create a special effect attached to the LB_TargetEffectAttachment[3] of LB_Picked using LB_TargetEffect[3]














Special Effect - Destroy (Last created special effect)














Animation - Reset LB_Unit's animation














Animation - Play LB_Unit's LB_Animation[3] animation













Else - Actions












Animation - Change LB_Picked flying height to LB_TargetHeight at 0.00












Custom script: call RemoveLocation ( udg_LB_PickedLoc )











Else - Actions








Custom script: call RemoveLocation ( udg_LB_UnitLoc )








Custom script: call DestroyGroup( udg_LB_isKnockedUp )








Set LB_CurrentDuration = (LB_CurrentDuration - LB_LoopSpeed)








Hashtable - Save LB_CurrentDuration as (Key duration) of LB_UnitKey in LB_Hash







Else - Actions








Unit - Unpause LB_Unit








Hashtable - Clear all child hashtables of child LB_UnitKey in LB_Hash








Unit Group - Remove LB_Unit from LB_LoopGroup








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









If - Conditions










(LB_LoopGroup is empty) Equal to True









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions





Else - Actions






Set LB_UnitLoc = (Position of LB_Unit)






Unit - Unpause LB_Unit






Animation - Change LB_Unit flying height to (Default flying height of LB_Unit) at LB_SlamSpeedCaster






Set LB_isKnockedUp = (Units within LB_Range[LB_Level] of LB_UnitLoc)






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







Loop - Actions








Set LB_Picked = (Picked unit)








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









If - Conditions










(LB_Picked is in KUS_group) Equal to True










(LB_Picked is A structure) Equal to False










(LB_Picked is alive) Equal to True










(LB_Picked belongs to an enemy of LB_Owner) Equal to True









Then - Actions










Unit - Cause LB_Unit to damage LB_Picked, dealing LB_Damage[LB_Level] damage of attack type LB_AttackType and damage type LB_DamageType










-------- Setting to 100 helps with MUI and lets the KUS put it back to default --------










Animation - Change LB_Picked flying height to 100.00 at LB_SlamSpeedTarget










Special Effect - Create a special effect attached to the LB_TargetEffectAttachment[4] of LB_Picked using LB_EffectTargetSlam










Special Effect - Destroy (Last created special effect)









Else - Actions






Custom script: call RemoveLocation ( udg_LB_UnitLoc )






Custom script: call DestroyGroup( udg_LB_isKnockedUp )






Hashtable - Clear all child hashtables of child LB_UnitKey in LB_Hash






Unit Group - Remove LB_Unit from LB_LoopGroup






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







If - Conditions








(LB_LoopGroup is empty) Equal to True







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions