Moderator
M
Moderator
Whirlpool v1.0.3 | Reviewed by Maker | 11th Oct 2013 | ||||
| APPROVED | ||||
|
TooltipConjures a whirlpool at the target area. The whirlpool deals [3 + (Level x 2) + (Intelligence x 0.25)] damage every second and pulls enemies caught into the center while also slowing them while inside.
WP spell init

Events


Map initialization

Conditions

Actions


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


Hashtable - Create a hashtable


Set WP_Hashtable = (Last created hashtable)


-------- READ ME! --------


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


-------- You can change the targets hit in the loop trigger, just find this: --------


-------- (tempPickedUnit is A structure) Equal to False --------


-------- (tempPickedUnit is A flying unit) Equal to False --------


-------- (tempPickedUnit is Magic Immune) Equal to False --------


-------- (tempPickedUnit is dead) Equal to False --------


-------- (tempPickedUnit is hidden) Equal to False --------


-------- (tempPickedUnit belongs to an enemy of (Owner of tempCaster)) Equal to True --------


-------- You can change these to match your preferences. --------


-------- Just remember! There's TWO places with these conditions, and you'll need to change both if you want to allow new targets. --------


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


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


-------- Explaining Base, Bonus and Max values. --------


-------- Base value is the the first value applied, in Damage that means it'll always deal a minimum of <3> damage. --------


-------- In Duration it means it'll always last atleast 5 seconds. --------


-------- In range it means the area hit will always be atleast 250. --------


-------- Bonus values is the second value applied. --------


-------- It means that for each level, another bonus value will be applied. ( Level times Bonus Value ) --------


-------- So since the lowest level you can have of an ability before you can use it is always 1 the final duration will never be 5. --------


-------- After Bonus values there's Stat Scaling. --------


-------- In this spell it scales your caster's Intelligence by 25% and adds that to the final damage. --------


-------- ( Caster's Intelligence times 0.25 ) --------


-------- Max values determines if your total value sum is too high. --------


-------- If your total sum is higher than the set Max Value it'll automatically decrease to the Max Value. --------


-------- Max Values exist so that you can create an exponential scaling but not have it outrageously large at later levels. --------


-------- If you don't want Max Values you can simply set them to 0 --------


-------- Same goes for Base Values and Bonus Values. --------


-------- If you have no Base Value nor Bonus Value it will only deal damage based on the 25% Intelligence scaling. --------


-------- You can only have no Base Value and no Bonus Value on the Damage Component, all other Components will stop functioning if both values are 0. --------


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


Set WP_Damage_Base = 3.00


Set WP_Damage_Bonus = 2.00


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


-------- Set value as %. --------


Set WP_Damage_Scaling_Base = 20.00


Set WP_Damage_Scaling_Bonus = 5.00


Set WP_Damage_Scaling_Max = 50.00


-------- WP_Damage_Scaling is how much % of Intellect you gain as extra damage. Now it's Int x .25, so you get 25% of your int as extra damage. --------


-------- If you want to use a different primary attribute you change that in the cast trigger --------


-------- Damage Per Second: --------


-------- deals (((3 + level x 2) + (Int x 0.25)) x 0.15 ) every 0.15 seconds(WP_Pull_Interval x 0.03) --------


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


Set WP_Pull_Intensity_Base = 4.00


Set WP_Pull_Intensity_Bonus = 1.00


Set WP_Pull_Intensity_Max = 8.00


Set WP_Pull_Interval = 5


-------- Pulls 4.00 steps every WP_Pull_Interval x 0.03 --------


-------- 0.03 x WP_Pull_Interval = interval --------


-------- Reducing the interval or increasing the pull intensity will make the whirlpool pull harder. At a certain point it will be impossible to move inside it. --------


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


-------- Interval for special effects and debuff slow. --------


-------- Debuff is 45% movementspeed and lasts for .5 seconds. This can be configured in the Object Editor. --------


-------- (WP_Interval_Integer) x 0.03 = Time --------


Set WP_Interval_Integer = 15


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


-------- Range does not mean cast range in this case, it means the Area of Effect. --------


-------- If you change these values, be sure to change the size of the targeter for the spell in the Object Editor, otherwise it'll be off. --------


Set WP_Range_Base = 250.00


Set WP_Range_Bonus = 50.00


Set WP_Range_Max = 500.00


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


-------- Duration in seconds. --------


-------- Base + (Bonus x Level) --------


-------- Cannot go higher than Max --------


Set WP_Duration_Base = 3.00


Set WP_Duration_Bonus = 3.00


Set WP_Duration_Max = 10.00


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


-------- When Imported these unit names may change --------


-------- WP_Unit_Type_Dummy needs to be Dummy (standard) --------


-------- WP_Unit_Type_Whirl_Dummy needs to be Dummy (whirlpool) --------


-------- WP_Unit_Type_Whirl_Dummy_2 needs to be Dummy (whirlpool tornado) --------


Set WP_Unit_Type_Dummy = Dummy (standard)


Set WP_Unit_Type_Whirl_Dummy = Dummy (whirlpool)


Set WP_Unit_Type_Whirl_Dummy_2 = Dummy (whirlpool tornado)


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


-------- Don't change WP_Dummy_Scale_Factor, it adjusts the scale of the special effect to match the area of effect. --------


Set WP_Dummy_Scale_Factor = 0.22


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


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


-------- When Imported these spell names in the variables may change --------


-------- WP_Spell_ID needs to be Whirlpool --------


-------- WP_Spell_ID_2 needs to be Whirlpool Slow --------


Set WP_Spell_ID = Whirlpool


Set WP_Spell_ID_2 = Whirlpool Slow


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


-------- You can change damage type and attack type but changing damage type will make Ethereal units avoid the damage(Banished units). Banished units normally take 66% extra damage. --------


Set WP_Attack_Type = Spells


Set WP_Damage_Type = Magic


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


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


-------- This is just an order string, it orders the dummy to cast the Slow effect. --------


Set WP_Ability_Order = slow


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


-------- These are the special effects used besides dummies. --------


-------- WP_Effect_Center is the effect used under the tornado in the center of the whirlpool --------


-------- WP_Effect_Hit is the effect used on units that are affected by the whirlpool --------


Set WP_Effect_Center = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl


Set WP_Effect_Hit = Abilities\Weapons\WaterElementalMissile\WaterElementalMissile.mdl


-------- Cast Range, Mana Cost and Cooldown is set as always in the Object Editor --------


-------- --------------------------------------------------------------- --------
WP spell cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to WP_Spell_ID

Actions


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


Set tempCaster = (Triggering unit)


Set tempPoint_Whirlpool = (Target point of ability being cast)


Set tempLevel = (Real((Level of WP_Spell_ID for tempCaster)))


Set tempInt_Counter = 0


Set tempInt_Counter_2 = 0


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


Set tempDamage_Total = (WP_Damage_Base + (WP_Damage_Bonus x tempLevel))


-------- If you want to use a different primary attribute you change that here. --------


Set tempDamage_Scaling_Total = (WP_Damage_Scaling_Base + (tempLevel x WP_Damage_Scaling_Bonus))


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



If - Conditions




tempDamage_Scaling_Total Greater than WP_Damage_Scaling_Max




WP_Damage_Scaling_Max Greater than 0.00



Then - Actions




Set tempDamage_Scaling_Total = (WP_Damage_Scaling_Max / 100.00)



Else - Actions




Set tempDamage_Scaling_Total = (1.00 x ((WP_Damage_Scaling_Base / 100.00) + (tempLevel x (WP_Damage_Scaling_Bonus / 100.00))))


Set tempDamage_Total = (tempDamage_Total + (tempDamage_Scaling_Total x (Real((Intelligence of tempCaster (Include bonuses))))))


Set tempDuration_Total = (WP_Duration_Base + (WP_Duration_Bonus x tempLevel))


Set tempRange_Total = (WP_Range_Base + (WP_Range_Bonus x tempLevel))


Set tempPull_Intensity_Total = (WP_Pull_Intensity_Base + (WP_Pull_Intensity_Bonus x tempLevel))


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


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



If - Conditions




tempDuration_Total Greater than WP_Duration_Max




WP_Duration_Max Greater than 0.00



Then - Actions




Set tempDuration_Total = WP_Duration_Max



Else - Actions


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



If - Conditions




tempPull_Intensity_Total Greater than WP_Pull_Intensity_Max




WP_Pull_Intensity_Max Greater than 0.00



Then - Actions




Set tempPull_Intensity_Total = WP_Pull_Intensity_Max



Else - Actions


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



If - Conditions




tempRange_Total Greater than WP_Range_Max




WP_Range_Max Greater than 0.00



Then - Actions




Set tempRange_Total = WP_Range_Max



Else - Actions


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


Unit - Create 1 WP_Unit_Type_Whirl_Dummy_2 for (Triggering player) at tempPoint_Whirlpool facing Default building facing degrees


Set WP_Dummy_Whirlpool = (Last created unit)


Unit - Make WP_Dummy_Whirlpool Explode on death


Unit - Add a tempDuration_Total second Generic expiration timer to WP_Dummy_Whirlpool


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


Unit - Create 1 WP_Unit_Type_Whirl_Dummy for (Triggering player) at tempPoint_Whirlpool facing Default building facing degrees


Set WP_Dummy_Whirlpool = (Last created unit)


Unit Group - Add WP_Dummy_Whirlpool to WP_Loop_Group


Unit - Make WP_Dummy_Whirlpool Explode on death


Unit - Add a tempDuration_Total second Generic expiration timer to WP_Dummy_Whirlpool


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


Animation - Change WP_Dummy_Whirlpool's size to ((tempRange_Total x WP_Dummy_Scale_Factor)%, 0.00%, 0.00%) of its original size


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


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


Item - Create Tome of Experience at tempPoint_Whirlpool


Set tempItem = (Last created item)


Item - Hide tempItem


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


Set tempKey = (Key (Last created unit))


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


Hashtable - Save Handle OftempCaster as 1 of tempKey in WP_Hashtable


Hashtable - Save tempDamage_Total as 2 of tempKey in WP_Hashtable


Hashtable - Save tempRange_Total as 3 of tempKey in WP_Hashtable


Hashtable - Save Handle OftempPoint_Whirlpool as 4 of tempKey in WP_Hashtable


Hashtable - Save tempInt_Counter as 5 of tempKey in WP_Hashtable


Hashtable - Save tempPull_Intensity_Total as 6 of tempKey in WP_Hashtable


Hashtable - Save Handle OftempCaster as 1 of tempKey in WP_Hashtable


Hashtable - Save tempPull_Intensity_Total as 6 of tempKey in WP_Hashtable


Hashtable - Save tempInt_Counter_2 as 7 of tempKey in WP_Hashtable


Hashtable - Save Handle OftempItem as 8 of tempKey in WP_Hashtable


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


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



If - Conditions




WP_Group_Counter Equal to 0



Then - Actions




Trigger - Turn on WP spell loop <gen>



Else - Actions


Set WP_Group_Counter = (WP_Group_Counter + 1)
WP spell loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




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




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




Set tempPickedUnit = (Picked unit)




Set tempKey = (Key (Picked unit))




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




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





If - Conditions






Or - Any (Conditions) are true







Conditions








(tempPickedUnit is dead) Equal to True








(Unit-type of tempPickedUnit) Equal to No unit-type





Then - Actions






Unit Group - Remove tempPickedUnit from WP_Loop_Group






Set WP_Group_Counter = (WP_Group_Counter - 1)






Set tempPoint_Whirlpool = (Load 4 of tempKey in WP_Hashtable)






Custom script: call RemoveLocation(udg_tempPoint_Whirlpool)






Set tempItem = (Load 8 of tempKey in WP_Hashtable)






Item - Remove tempItem






Hashtable - Clear all child hashtables of child tempKey in WP_Hashtable






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






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







If - Conditions








WP_Group_Counter Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions






Set tempCaster = (Load 1 of tempKey in WP_Hashtable)






Set tempDamage_Total = (Load 2 of tempKey from WP_Hashtable)






Set tempRange_Total = (Load 3 of tempKey from WP_Hashtable)






Set tempPoint_Whirlpool = (Load 4 of tempKey in WP_Hashtable)






Set tempInt_Counter = (Load 5 of tempKey from WP_Hashtable)






Set tempInt_Counter = (tempInt_Counter + 1)






Hashtable - Save tempInt_Counter as 5 of tempKey in WP_Hashtable






Set tempPull_Intensity_Total = (Load 6 of tempKey from WP_Hashtable)






Set tempInt_Counter_2 = (Load 7 of tempKey from WP_Hashtable)






Set tempInt_Counter_2 = (tempInt_Counter_2 + 1)






Hashtable - Save tempInt_Counter_2 as 7 of tempKey in WP_Hashtable






Set tempItem = (Load 8 of tempKey in WP_Hashtable)






-------- Damage and Pull --------






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







If - Conditions








tempInt_Counter Equal to WP_Pull_Interval







Then - Actions








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








Special Effect - Create a special effect at tempPoint_Whirlpool using WP_Effect_Center








Special Effect - Destroy (Last created special effect)








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








Set tempInt_Counter = 0








Hashtable - Save tempInt_Counter as 5 of tempKey in WP_Hashtable








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








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








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within tempRange_Total of tempPoint_Whirlpool) and do (Actions)









Loop - Actions










Set tempPickedUnit = (Picked unit)










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











If - Conditions












(tempPickedUnit is A structure) Equal to False












(tempPickedUnit is A flying unit) Equal to False












(tempPickedUnit is Magic Immune) Equal to False












(tempPickedUnit is dead) Equal to False












(tempPickedUnit is hidden) Equal to False












(tempPickedUnit belongs to an enemy of (Owner of tempCaster)) Equal to True











Then - Actions












Set tempPoint_Target = (Position of tempPickedUnit)












Set tempAngle_Real = (Angle from tempPoint_Target to tempPoint_Whirlpool)












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












Unit - Cause tempCaster to damage tempPickedUnit, dealing (tempDamage_Total x (0.03 x (Real(WP_Pull_Interval)))) damage of attack type WP_Attack_Type and damage type WP_Damage_Type












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












Set tempPoint_Temp = (tempPoint_Target offset by tempPull_Intensity_Total towards tempAngle_Real degrees)












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












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












Custom script: call RemoveLocation(udg_tempPoint_Target)












Item - Show tempItem












Item - Move tempItem to tempPoint_Temp












Set tempPoint_Target = (Position of tempItem)












Item - Hide tempItem












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












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













If - Conditions














(Distance between tempPoint_Target and tempPoint_Temp) Less than or equal to 2.00













Then - Actions














Set tempAngle_Real = (Facing of tempPickedUnit)














Custom script: call SetUnitX(udg_tempPickedUnit, GetLocationX(udg_tempPoint_Temp))














Custom script: call SetUnitY(udg_tempPickedUnit, GetLocationY(udg_tempPoint_Temp))














Unit - Make tempPickedUnit face tempAngle_Real over 0.00 seconds













Else - Actions












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












Custom script: call RemoveLocation(udg_tempPoint_Target)












Custom script: call RemoveLocation(udg_tempPoint_Temp)












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











Else - Actions







Else - Actions






-------- Slow Buff and Special Effects --------






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







If - Conditions








tempInt_Counter_2 Equal to WP_Interval_Integer







Then - Actions








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








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








Set tempInt_Counter_2 = 0








Hashtable - Save tempInt_Counter_2 as 7 of tempKey in WP_Hashtable








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








Unit - Create 1 Dummy (standard) for (Owner of tempCaster) at tempPoint_Whirlpool facing Default building facing degrees








Set WP_Dummy_Loop = (Last created unit)








Unit - Add WP_Spell_ID_2 to WP_Dummy_Loop








Unit - Add a 0.45 second Generic expiration timer to WP_Dummy_Loop








Unit - Make WP_Dummy_Loop Explode on death








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








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within tempRange_Total of tempPoint_Whirlpool) and do (Actions)









Loop - Actions










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










Set tempPickedUnit = (Picked unit)










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










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











If - Conditions












(tempPickedUnit is A structure) Equal to False












(tempPickedUnit is A flying unit) Equal to False












(tempPickedUnit is Magic Immune) Equal to False












(tempPickedUnit is dead) Equal to False












(tempPickedUnit is hidden) Equal to False












(tempPickedUnit belongs to an enemy of (Owner of tempCaster)) Equal to True











Then - Actions












Set tempPoint_Target = (Position of tempPickedUnit)












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












Special Effect - Create a special effect at tempPoint_Target using WP_Effect_Hit












Special Effect - Destroy (Last created special effect)












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












Custom script: call IssueTargetOrder(udg_WP_Dummy_Loop,udg_WP_Ability_Order,udg_tempPickedUnit)












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












Custom script: call RemoveLocation(udg_tempPoint_Target)











Else - Actions







Else - Actions
Credits
Credit to Mc ! for the whirlpool model
Inspired by Smite god, Poseidon. (www.smitegame.com) Play for Free.