Member
Join Date: Jul 2009
Location: Where the magic is.
Posts: 639
|
6.66 triggers
Slark, the Murloc Nightcrawler
[A1IM] Dark Pact
The base spell is Fan of Knives which provides the targeting function and the ability icon.
Variables- Source //Murloc Nightcrawler
- Level //The level of the Dark Pact ability
- SourceX //The X-coordinate of Slark
- SourceY //The Y-coordinate of Slark
- DarkPactFX //The [h0B2] dummy unit usedwhich provides the visuals
- Modifier //The value used to calculate the self-damage
- EnumUnit //The unit which is currently being processed
- Group1 //The group to be damaged
Abilities- [A1IM] //Dark Pact (cast by Murloc Nightcrawler)
Functions - Function 2
Store the triggering unit as Source
Store the level of the [A1IM] ability as Level
Set Modifier to Level*75/2
Create a timer which runs out after 2 secondsCall Function 3 when the timer runs out
If [Source died] thenCall Function 3 If [GetUnitState(Source,UNIT_STATE_LIFE) ≤ Modifier*0.75] thenSet Modifier to GetUnitState(Source,UNIT_STATE_LIFE)/0.75-10 Make Source damage Source for Modifier magic damage //ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE
- Function 3
Get the X-coordinate of Source and store it as SourceX
Get the Y-coordinate of Source and store it as SourceY
If [this function was called because Source died] thenDestroy this trigger ElseIf [TriggerCalls=1] then Create a [h0B2] dummy unit for the owner of Source at (SourceX, SourceY) and store this unit as DarkPactFX
Apply a timed life of 1 second to DarkPactFX
Create a timer which runs at a 0.1 second interval
ElseIf [TriggerCalls=6] then Destroy this trigger
Group all units which satisfy Condition 2
Is a living enemy non-dummy non-structure non-ancient (except Spirit Bear) unit ... within 350 AoE around (SourceX, SourceY) and store them as Group1
For Group1Call Function 4 for each interval For SourceCall Function 5 for each interval
- Function 4
Make Source damage EnumUnit for Level*75/5 magic damage //ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE
- Function 5
Remove the following buffs from Source:
- [B06Z]-Quillbeast Poison
- [BPSE]-Hellfire Blast, War Stomp, Light Strike Array, Magic Missile, Headshot, Chaos Bolt, Reverse Polarity, Split Earth, Shuriken Toss, MKB's Bash, Hoof Stomp, Basher's Bash, Sunder Stun, Troll's Bash, Assassinate Stun, Fireblast, Ravage, Reaper's Scythe's Stun, Dragon Tail, Aftershock, Craggy Exterior, Avalanche, Mana Void's Stun, Charge of Darkness' Stun, Slardar's Bash, Malefice's Stun...
- [B06Q]-Primal Roar's Slow
- [BSTN]-Expulsion's Ministun, Dream Coil's Stuns (both), Fissure, Cold Snap's Ministun
- [BHtc]-Thunder Clap's Slow
- [B0BM]-Echo Stomp
- [B0BR]-Earth Splitter slow
- [B0C1]-Spirit Bear's Entangle
- [BEer]-Overgrowth's Entangle
- [B02U]-Viscous Nasal Goo
- [B07E]-Poison Touch's Stun, Poison Touch's Slow
- [B0CF]-Cold Feet Stun
- [B06M]
- [B07N]-Meat Hook's Ministun
- [B08S]
- [B00Q]
- [B072]-Unstable Concoction's Stun
- [BUan]
- [B095]-Battery Assault
- [B083]-Life Break's Slow
- [B02V]-Epicenter's Slow
- [B01Y]-Charge of Darkness' Faerie Fire
- [BNab]-Gush
- [B08R]-Open Wounds' Slow
- [B066]-Frostmourne's Slow
- [B03I]-Dismember
- [B063]-Slithereen Crush's Slow
- [Bena]-Ensnare
- [Beng]-Ensnare
- [B03C]-Spirit Lance's Slow
- [B00L]-Track
- [BHca]-Frost Arrows / Frost Attack
- [Bcsd]-Frost Arrows 2nd position / Frost Attack 2nd position
- [B079]-Geostrike
- [B0BQ]-Stone Gaze's Purge
- [B0B9]
- [Bprg]-Many other Purges
- [B08M]-Psionic Trap's Slow
- [B02G]-Earthshock
- [B01X]-Bloodrage
- [B01D]-Drunken Haze level 1, Incapacitating Bite
- [B092]-Stifling Dagger's Slow
- [B0AQ]-Venomous Gale
- [BEsh]-Many other Shadow Strikes
- [B001]-Viper Strike
- [B017]-Frostbite
- [B0AE]-Electric Vortex
- [B0AD]-Electric Vortex 2nd position
- [B08O]-Waning Rift Silence
- [Bfro]-Eye of Skadi (both Melee and Ranged), Frost Breath, Crystal Nova, Frost Armor, Frost Attack (Lucy), Frost Nova, Chain Frost, Dual Breath's slow
- [B027]
- [B028]-Poison Nova's Phoenix Fire
- [B05H]-Penitence Slow
- [B0BS]-Sticky Napalm
- [Bcri]-Grave Chill
- [B0BF]-Flaming Lasso
- [B0BE]-Flaming Lasso 2nd position
- [B090]-Shackles
- [B008]-Shackles 2nd position
- [B06W]
- [B04B]-Fiend's Grip
- [B02F]-Nightmare
- [BUsp]
- [Bust]
- [B0CC]-Cold Feet
- [BCri]
- [B03J]-Ignite
- [BEsh]-Shadow Strike
- [B001]-Viper Strike
- [B0AQ]-Venomous Gale
- [Bena]-Ensnare
- [Beng]-Ensnare
- [B078]-Earthbind
- [Bdet]-Dust of Appearance
- [A1LD]-Ice Blast's FX
- [B0CD]-Ice Blast
- [A1JA]-Ice Blast's Slow Aura
- [Bslo]-Enchant Slow
- [B00T]-Amplify Damage
- [BNdh]-Drunken Haze level 2/3/4
- [B07V]-Traxex's Silence
- [B07U]-Global Silence
- [B0C8]
- [B01X]-Bloodrage
- [BNsi]-Krobelus' Silence, Last Word's Soul Burn
- [BNso]
- [B031]-Orchid's Silence
- [B08O]-Waning Rift's Silence
Conditions- Condition 1
If the spell which went into effect was [A1IM] ...
- Condition 2
Is a living enemy non-dummy non-structure non-ancient (except Spirit Bear) unit ...
Notes
The [h0B2] dummy unit has the following model path: war3mapImported\SuperDarkFlash
[A1J7] Pounce
The base spell is Channel which provides the targeting function and the ability icon.
Variables- Source //Murloc Nightcrawler
- Level //The level of the Pounce ability
- FinalLoc //The maximum range of Pounce
- DistanceRemainder //The remaining distance for Slark to travel
- FacingAngle //The angle Slark is facing when Pounce goes into effect
- StartX //The X-coordinate of Slark at the moment Pounce goes into effect
- StartY //The Y-coordinate of Slark at the moment Pounce goes into effect
- FinalLocX //The X-coordinate of the farthest point Slark can jump to
- FinalLocY //The Y-coordinate of the farthest point Slark can jump to
- EvalCount //The number of times Function 3 has been called
- MoveDistanceX //The X value for which Slark is moved each iteration
- MoveDistanceY //The Y value for which Slark is moved each iteration
- MaxHeight //A value used to modify the fly height of Slark while pouncing
- HeightModifier //A value used to modify the fly height of Slark while pouncing
- Group1 //The group from which the target is picked
- Target //The leashed enemy
- Lightning //The lightning visual
- EndX //The X-coordinate of Slark at the moment of impact
- EndY //The Y-coordinate of Slark at the moment of impact
- TargetX1 //The X-coordinate of the leashed enemy
- TargetY1 //The Y-coordinate of the leashed enemy
- TargetX2 //The X-coordinate of the leashed enemy compared to the previous one
- TargetY2 //The Y-coordinate of the leashed enemy compared to the previous one
- Distance //The distance which the leashed enemy has moved between two checks
- Angle //The angle between the leashed enemy and the point of impact
- ReturnX //The X value to which the leashed enemy will be returned when it moves more than 325 distance
- ReturnY //The Y value to which the leashed enemy will be returned when it moves more than 325 distance
Abilities- [A1J7] //Pounce
- [Amrf] //Crow Form
- [A1J6] //Ability containing the visuals of Pounce
Functions- Function 2
Store the triggering unit as Source
Store the level of the [A1J7] ability as Level
Set FinalLoc to 300+100*Level
Store the angle Source is facing as FacingAngle
Get the X-coordinate of Source and store it as StartX
Get the Y-coordinate of Source and store it as StartY
Set FinalLocX to be StartX + FinalLoc in FacingAngle direction
Set FinalLocY to be StartY + FinalLoc in FacingAngle direction
Add the [Amrf] ability to Source
Remove the [Amrf] ability from Source
Set the pathing of Source to False
Add the [A1J6] ability to Source
Create a timer which runs at a 0.03 second intervalCall Function 3 for each interval
- Function 3
Store the number of times this function has been called as EvalCount
Set MoveDistanceX to StartX+(30*(20+Level*2)/30)*EvalCount in FacingAngle direction
Set MoveDistanceY to StartY+(30*(20+Level*2)/30)*EvalCount in FacingAngle direction
Calculate the distance between (MoveDistanceX, MoveDistanceY) and (FinalLocX, FinalLocY) and store it as DistanceRemainder
Set MaxHeight to 175
Set HeightModifier to (1-DistanceRemainder/FinalLoc)*MaxHeight*2
If [EvalCount = 1] then Set the Animation of Source to 5
Set the Time Scale of Source to 1.5 If [HeightModifier > MaxHeight] then Set the Animation of Source to 5
Set HeightModifier to MaxHeight*2-HeightModifier Set the Fly Height of Source to HeightModifier
Set the X-coordinate of Source to MoveDistanceX
Set the X-coordinate of Source to MoveDistanceY
Make Source face FacingAngle
Group all units which satisfy Condition 2
Is a living enemy non-dummy non-structure non-ancient (except Spirit Bear) unit ... in 110 AoE around (MoveDistanceX, MoveDistanceY) and store them as Group1
Pick the first unit from Group1 and store it as Target
If [DistanceRemainder < 30] or [EvalCount > 75] or [Target != null] thenSet the Fly Height of Source to 0
Set the Time Scale of Source to 1
Make Source play its "Stand" animation
Set the pathing of Source to True
Remove the [A1J6] ability from Source
Destroy destructables in a 200x200 rectangle around Source If [Target != null] and [Target is not magic immune] thenCall Function 4
- Function 4
Add the PONC lightning visual between the coordinates of Source and Target and store its handle as Lightning
Get the X-coordinate of Source and store it as EndX
Get the Y-coordinate of Source and store it as EndY
Get the X-coordinate of Target and store it as TargetX1
Get the Y-coordinate of Target and store it as TargetY1
Create a timer which runs at a 0.03 second intervalCall Function 5 for each interval
If [Target died] thenCall Function 5 Make Source damage Target for 25+25*Level magic damage //ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE
Order Source to attack Target
- Function 5
Get the X-coordinate of Target and store it as TargetX2
Get the Y-coordinate of Target and store it as TargetY2
Calculate the distance between (TargetX1, TargetY1) and (TargetX2, TargetY2) and store it as Distance
Set TargetX1 to TargetX2
Set TargetY1 to TargetY2
If [Distance > 100] or [TriggerCalls > 3.5/0.03] or [Target is magic immune] thenDestroy Lightning
Destroy this trigger ElseMove Lightning to (EndX, EndY, TargetX2, TargetY2) If [the distance between (EndX, EndY) and (TargetX2, TargetY2) is greater than 325] thenCalculate the angle between (TargetX2, TargetY2) and (EndX, EndY) and store it as Angle
Set ReturnX to EndX + 325 in Angle direction
Set ReturnY to EndY + 325 in Angle direction
Set the X-coordinate of Target to ReturnX
Set the Y-coordinate of Target to ReturnY
Conditions- Condition 1
If the spell which went into effect was [A1J7] ...
- Condition 2
Is a living enemy non-dummy non-structure non-ancient (except Spirit Bear) unit ...
[A1HR] Essence Shift
The base spell is Evasion which provides the ability icon.
Variables- Source //Slark
- Level //The level of the Essence Shift ability
- Modifier //The value used to determine the main attribute of the attacked hero
- Target //The attacked unit
- EssenceShiftCooldown //An integer used to determine whether Essence Shift is on cooldown
- ModifierAgi //The value used to determine the amount of "stolen" Agility
- ModifierStr //The value used to determine the amount of "stolen" Strength
- ModifierInt //The value used to determine the amount of "stolen" Intelligence
- Boolean1 //A Boolean used to control the restoration of the stats
- Boolean2 //A Boolean used to control the restoration of the stats
Abilities- [A1HR] //Essence Shift (possessed by Murloc Nightcrawler)
Functions- Function 3
If [(EssenceShiftCooldown = 1) = False] thenCall Function 10 Call Function 4
- Function 4
Store the triggering unit as Target //This is basically the unit you started the attack against
Store the attacker as Source
Create a timer which runs out after 1 secondsCall Function 5 when the timer runs If [Target was damaged] thenCall Function 5
- Function 5
If [this function was called because Target was damaged] thenIf [Source = GetEventDamageSource()] thenCreate a timer which runs out after 0.01 secondCall Function 6 when the timer runs out If [Source died] thenCall Function 6 If [Target died] thenCall Function 6 ElseDestroy this trigger
- Function 6
If [this function was not called because a unit died] thenCall Function 7
- Function 7
Store the level of the [A1HR] ability as Level
For TargetCall Function 8
If [Modifier=2] thenSet ModifierAgi=Min(GetHeroAgi(Target,NoBonuses)-1,2) If [(GetHeroAgi(Target,NoBonuses)-1) < 2] thenSet ModifierAgi=GetHeroAgi(Target,NoBonuses)-1 ElseSet ModifierAgi=2 //This is how the 'IMinBJ' function works. All the other Stat Modifiers are assigned according to it and explaining every single one of them would be rather annoying, so refer to this one If [Modifier=2] thenSet ModifierStr=Min(GetHeroStr(Target,NoBonuses)-1,1) Set ModifierInt=Min(GetHeroInt(Target,NoBonuses)-1,1) If [Modifier=3] thenSet ModifierAgi=Min(GetHeroAgi(Target,NoBonuses)-1,1) Set ModifierStr=Min(GetHeroStr(Target,NoBonuses)-1,2) Set ModifierInt=Min(GetHeroInt(Target,NoBonuses)-1,1) If [Modifier=1] thenSet ModifierAgi=Min(GetHeroAgi(Target,NoBonuses)-1,1) Set ModifierStr=Min(GetHeroStr(Target,NoBonuses)-1,1) Set ModifierInt=Min(GetHeroInt(Target,NoBonuses)-1,2) Set the agility of Source to GetHeroAgi(Source,NoBonuses) + ModifierAgi + ModifierInt + ModifierStr
Set the agility of Target to GetHeroAgi(Target,NoBonuses) - ModifierAgi
Set the strength of Target to GetHeroStr(Target,NoBonuses) - ModifierStr
Set the intelligence of Target to GetHeroInt(Target,NoBonuses) - ModifierInt
Set Boolean1 to False
Set Boolean2 to False
Create a timer which runs out after 15*Level secondsCall Function 9 when the timer runs out
If [Source died] thenCall Function 9 If [Target died] thenCall Function 9
- Function 8
If [the main attribute of Target is Agility] thenSet Identifier to 2 If [the main attribute of Target is Strength] thenSet Identifier to 3 If [the main attribute of Target is Intelligence] thenSet Identifier to 1 If [the unit ID of Target is [Eevm] or [N02B] or [N017] or [N013] or [N014] or [N015] or [H08D] or [H08C] or [H084] or [H08B]] thenSet Identifier to 2 If [the unit ID of Target is [N01H] or [N01T] or [N01J] or [H00E] or [H00G] or [H00F] or [H07I] or [E015]] thenSet Identifier to 3 If [the unit ID of Target is [H06X] or [H06Y] or [H06W] or [H0BC] or [O017]] thenSet Identifier to 1
- Function 9
If [this function was called because a unit died] thenIf [Boolean1 = False and the unit which died is Source] then Set Boolean1 to True
Set the agility of Source to GetHeroAgi(Source,NoBonuses) - ModifierAgi - ModifierInt - ModifierStr
Else if [Boolean2 = False and the unit which died is Target] then Set Boolean2 to True
Set the agility of Target to GetHeroAgi(Target,NoBonuses) + ModifierAgi
Set the strength of Target to GetHeroStr(Target,NoBonuses) + ModifierStr
Set the intelligence of Target to GetHeroInt(Target,NoBonuses) + ModifierInt ElseIf [Boolean1 = False] then Set Boolean1 to True
Set the agility of Source to GetHeroAgi(Source,NoBonuses) - ModifierAgi - ModifierInt - ModifierStr
If [Boolean2 = False] then Set Boolean2 to True
Set the agility of Target to GetHeroAgi(Target,NoBonuses) + ModifierAgi
Set the strength of Target to GetHeroStr(Target,NoBonuses) + ModifierStr
Set the intelligence of Target to GetHeroInt(Target,NoBonuses) + ModifierInt
- Function 10
Set EssenceShiftCooldown to 1
Create a timer which runs out after 0.45 - Level*0.05 secondsCall Function 11 when the timer runs out
- Function 11
Set EssenceShiftCooldown to 2
Conditions- Condition 1
If the [A1HR] ability was learned for the first time and the learning unit was not an illusion ...
- Condition 2
If the attacker has the [A1HR] ability and the attacked unit is an enemy non-Roshan non-structure hero unit and the attacker is Source ...
Notes
The 0.01 second delay is used in order to fix the "issue" with Shallow Grave
[A1IN] Shadow Dance
The base spell is Wind Walk which provides the projectile dodging property, the ability icon and the targeting function.
Variables- Source //Murloc Nightcrawler
- Level //The level of the Shadow Dance ability
- ShadowDanceFX //The [h0B1] dummy unit used which provides the visual effects of the active part
- Duration //The duration of the active part
- Time //The time of the game
- DisabledTime //The time during which the Spellbook abilities are removed after being damaged by a neutral unit
- Counter1 //A counter used to control the addition and the removal of the Spellbook abilities
- Counter2 //A counter used to control the addition and the removal of the Spellbook abilities
Abilities- [A1IN] //Shadow Dance (used by Murloc Nightcrawler)
- [A1HW] //Permanent Invisibility ability
- [A1HX] //Permanent Invisibility ability
- [B0C9] //The buff ID of the Slow Aura (Tornado) abilities
- [A1IE] //Spellbook ability used for level 1 which has the following abilities:
- [A1IC] //Healing Ward Aura ability providing the heal
- [A1I8] //Slow Aura (Tornado) ability providing the speed increase
- [A1I7] //Ability providng the visual effects of the passive part
- [A1IF] //Spellbook ability used for level 2 which has the following abilities:
- [A1ID] //Healing Ward Aura ability providing the heal
- [A1I9] //Slow Aura (Tornado) ability providing the speed increase
- [A1I7] //Ability providng the visual effects of the passive part
- [A1IG] //Spellbook ability used for level 3 which has the following abilities:
- [A1IB] //Healing Ward Aura ability providing the heal
- [A1IA] //Slow Aura (Tornado) ability providing the speed increase
- [A1I7] //Ability providng the visual effects of the passive part
Functions
- Function 2
Store the triggering unit as Source
Set Counter1 to 0
Set Counter2 to 0
Create a timer which runs at a 0.1 second intervalCall Function 3 for each interval
If [Source was damaged] thenCall Function 3 Set the [A1IE] ability to be unavailable to Source
Set the [A1IF] ability to be unavailable to Source
Set the [A1IG] ability to be unavailable to Source
- Function 3
Store the level of the [A1IN] ability as Level
Store the current game time as Time
If [Source is dead] thenSet Source to null If [this function was called because Source was damaged and GetEventDamageSource() is a neutral unit] thenIf [the level of the [A1IE] ability is greater than 0] then Remove the [A1IE] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IF] ability is greater than 0] then Remove the [A1IF] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IG] is greater than 0] then Remove the [A1IG] ability from Source
Remove the [B0C9] ability from Source
Set DisabledTime to Time + 2 If [DisabledTime > Time] thenSet Source to null //This is done so that when Slark is damaged by a neutral unit there will be no additional buff addition and removal for 2 seconds. Source is retrieved from the hashtable each time this function is called, so there aren't any unwanted effects either If [Source is visible to the enemy or Source has the [BNdo] buff] thenSet Counter2 to 0
If [the level of the [A1IE] ability is greater than 0] or [the level of the [A1IF] ability is greater than 0] or [the level of the [A1IG] ability is greater than 0] then Set Counter1 to Counter1+0.1
If [Counter1 > 0.6] then
Set Counter1 to 0
If [the level of the [A1IE] ability is greater than 0] then
Remove the [A1IE] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IF] ability is greater than 0] then
Remove the [A1IF] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IG] ability is greater than 0] then
Remove the [A1IG] ability from Source
Remove the [B0C9] ability from Source
If [Source is not visible to the enemy] thenSet Counter1 to 0
If [Level = 1 and the level of the [A1IE] ability equals 0] or [Level = 2 and the level of the [A1IF] ability equals 0] or [Level = 3 and the level of the [A1IG] ability equals 0] then Set Counter2 to Counter2+0.1
If [Counter2 > 0.6] then
Set Counter2 to 0
If [Level = 1] then
If [the level of the [A1IE] ability equals 0] then
Add the [A1IE] ability to Source
If [Level = 2] then
If [the level of the [A1IE] ability is greater than 0] then
Remove the [A1IE] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IF] ability equals 0] then
Add the [A1IF] ability to Source
If [Level = 3] then
If [the level of the [A1IE] ability is greater than 0] then
Remove the [A1IE] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IF] ability is greater than 0] then
Remove the [A1IF] ability from Source
Remove the [B0C9] ability from Source
If [the level of the [A1IG] ability equals 0] then
Add the [A1IG] ability to Source
- Function 5
Set Duration to 5.5
Create a [h0B1] dummy unit for the owner of Source at the position of Source and store it as ShadowDanceFX
Add the [A1HW] and the [A1HX] abilities to Source for Duration seconds or until Source dies
Create a timer which runs at a 0.03 second intervalCall Function 6 for each interval
- Function 6
If [TriggerCalls > 5.5/0.03] thenKill ShadowDanceFX
Destroy this trigger ElseSet the X-coordinate of ShadowDanceFX to GetUnitX(Source)
Set the Y-coordinate of ShadowDanceFX to GetUnitY(Source)
Conditions- Condition 1
If the [A1IN] ability was learned for the first time and the learning unit was not an illusion ...
- Condition 2
If the spell which went into effect was [A1IN] ...
Notes
The [h0B1] dummy unit has the following model path: war3mapImported\SmokescreenBlack5
__________________
Rest in peace, David Gold.
|