• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Storm's Call (v1.4)

  • Like
Reactions: Ofel
Observations

Before accomplishing the unloading of this resource, for kindness, read ALL of the information on the same.
In case of using my resource (in any way), please, be appreciated for the work rewarding with credits.


Changelogs

Current version (1.4)

Small alterations in the functions (SC_Model[7] altered and the variable Set SC_Chance_Purge[3]);
Alterations in the descriptions of the spell;
Same quality of the previous version (v1.3);

Old version (1.3)

Alterations accomplished in agreement with the moderator's suggestions (as the use of a single Dummy to destroy trees);
New functions (function of the spell and triggers)
Same approved quality of the version 1.2;
Alterations in the descriptions;

Function of the spell

Caster invokes the powers of the Thunder goes you help him/it to punish their enemies. When the Thunder i invoked, he falls of the skies and it reaches the earth. In this fall, he punishes the units areas to be to his/her circuit and it reaches the units to be on the affected land.
Besides, this electric discharge have chance of removing all of the buffs (negative and positive) of the units affected areas, it also punishes besides the normal the units that plows on aquatic land. It i finally, when the discharge reaches the ground, she flings any unit in the land goes far.

Cast Range: Any
Area of effect: 400
Knockback's distance: 280/340/410

Normal Damage: 70-100/130-174/200-274 divided by the amount of affected units
Damage Special: 120%/130%/150% of the normal damage that it cause goes units that plows on the waters
Chance of purging: 10%/18%/25%

CoolDown: None/null
Sister cost: None/null

Observation: the values and/or properties of this spell are optional and free for their alterations.


Triggers
[trigger=Requeriment]Knockback 2D
Events
Map initialization
Conditions
Actions
Custom script: set udg_KB2D_Hash = InitHashtable()
-------- -------------------------------------------- --------
-------- Creating Tree Cutter --------
-------- -------------------------------------------- --------
Set KB2D_Loc = (Center of (Playable map area))
Unit - Create 1 Peasant for Neutral Passive at KB2D_Loc facing Default building facing degrees
Set KB2D_Cutter = (Last created unit)
Unit - Hide KB2D_Cutter
Custom script: call UnitAddAbility(udg_KB2D_Cutter,'Aloc')
Custom script: call RemoveLocation(udg_KB2D_Loc)
-------- -------------------------------------------- --------
-------- Determines the Knockback Loop --------
-------- -------------------------------------------- --------
Set KB2D_Loop = 0.03
-------- -------------------------------------------- --------
-------- -------------------------------------------- --------
Custom script: call ExecuteFunc("InitKnockback2D")
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function destroys knockback --------
-------- -------------------------------------------- --------
Custom script: function DestroyKnockback takes nothing returns nothing
Hashtable - Clear all child hashtables of child KB2D_Key in KB2D_Hash
Unit Group - Remove KB2D_U from KB2D_LoopGroup
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function applies knockback to unit --------
-------- -------------------------------------------- --------
Custom script: function ApplyKnockbackEffect takes nothing returns nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
ers (KB2D_Target is A structure) Equal to False
(KB2D_Target is A flying unit) Equal to False
(KB2D_Target is alive) Equal to True
(KB2D_Target is in KB2D_LoopGroup) Equal to False
Then - Actions
Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_TempKey,1,udg_KB2D_Angle)
Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_TempKey,2,udg_KB2D_Duration)
Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_TempKey,3,udg_KB2D_Distance)
Hashtable - Save KB2D_SFX as 5 of KB2D_TempKey in KB2D_Hash
Unit Group - Add KB2D_Target to KB2D_LoopGroup
Else - Actions
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function applies speed --------
-------- -------------------------------------------- --------
Custom script: function ApplyKnockbackSpeed takes nothing returns real
Custom script: local real velocity = (udg_KB2D_Distance/udg_KB2D_Duration) * (udg_KB2D_Loop * 2)
Custom script: local real friction = (velocity/udg_KB2D_Duration) * (udg_KB2D_Loop * udg_KB2D_Loop)
Custom script: return velocity - friction
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function applies knockback coordinates --------
-------- -------------------------------------------- --------
Custom script: function ApplyKnockbackCoordinates takes nothing returns nothing
Custom script: local real speed = ApplyKnockbackSpeed()
Custom script: call SetUnitX(udg_KB2D_U, GetUnitX(udg_KB2D_U) + speed * Cos(udg_KB2D_Angle * bj_DEGTORAD))
Custom script: call SetUnitY(udg_KB2D_U, GetUnitY(udg_KB2D_U) + speed * Sin(udg_KB2D_Angle * bj_DEGTORAD))
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function checks the collision size --------
-------- -------------------------------------------- --------
Custom script: function GetUnitCollisionSize takes nothing returns integer
-------- -------------------------------------------- --------
-------- This is based from tier 3 halls,thanks to Vexorian for this code :D --------
-------- -------------------------------------------- --------
Custom script: local integer maxcollision = 196
Custom script: local integer a = 0
Custom script: local integer radius = maxcollision
Custom script: local real x = GetUnitX(udg_KB2D_U)
Custom script: local real y = GetUnitY(udg_KB2D_U)
Custom script: loop
Custom script: if IsUnitInRangeXY(udg_KB2D_U, x + radius, y, 0) then
Custom script: set a = radius
Custom script: else
Custom script: set maxcollision = radius
Custom script: endif
Custom script: exitwhen maxcollision - a <= 1
Custom script: set radius = (maxcollision + a) / 2
Custom script: endloop
Custom script: set radius = radius - maxcollision + a
Custom script: return radius
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function applies the bouncing angle --------
-------- -------------------------------------------- --------
Custom script: function GetKnockbackAngle takes nothing returns nothing
Custom script: set udg_KB2D_TouchRadius = I2R(GetUnitCollisionSize())
Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
Set KB2D_TempGroup = (Units within KB2D_TouchRadius of KB2D_Loc matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to KB2D_U))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Number of units in KB2D_TempGroup) Greater than 0
(Terrain pathing at KB2D_Offset of type Walkability is off) Equal to True
Then - Actions
Set KB2D_Angle = (360.00 - KB2D_Angle)
Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
Set KB2D_TempGroup = (Units within KB2D_TouchRadius of KB2D_Loc matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to KB2D_U))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Number of units in KB2D_TempGroup) Greater than 0
(Terrain pathing at KB2D_Offset of type Walkability is off) Equal to True
Then - Actions
Set KB2D_Angle = ((KB2D_Angle + 180.00) mod 360.00)
Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
Set KB2D_TempGroup = (Units within KB2D_TouchRadius of KB2D_Loc matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to KB2D_U))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Number of units in KB2D_TempGroup) Greater than 0
(Terrain pathing at KB2D_Offset of type Walkability is off) Equal to True
Then - Actions
Set KB2D_Angle = (360.00 - KB2D_Angle)
Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
Set KB2D_TempGroup = (Units within KB2D_TouchRadius of KB2D_Loc matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to KB2D_U))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Number of units in KB2D_TempGroup) Greater than 0
(Terrain pathing at KB2D_Offset of type Walkability is off) Equal to True
Then - Actions
Custom script: call DestroyKnockback()
Else - Actions
Custom script: call RemoveLocation(udg_KB2D_Offset)
Custom script: call DestroyGroup(udg_KB2D_TempGroup)
Else - Actions
Custom script: call RemoveLocation(udg_KB2D_Offset)
Custom script: call DestroyGroup(udg_KB2D_TempGroup)
Else - Actions
Custom script: call RemoveLocation(udg_KB2D_Offset)
Custom script: call DestroyGroup(udg_KB2D_TempGroup)
Else - Actions
Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_Key,1,udg_KB2D_Angle)
Custom script: call RemoveLocation(udg_KB2D_Offset)
Custom script: call DestroyGroup(udg_KB2D_TempGroup)
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function will move the unit --------
-------- -------------------------------------------- --------
Custom script: function MoveKnockbackUnit takes nothing returns nothing
Set KB2D_Loc = (Position of KB2D_U)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KB2D_Timer Less than KB2D_Duration
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(KB2D_U is dead) Equal to True
Then - Actions
Custom script: call DestroyKnockback()
Else - Actions
Custom script: call GetKnockbackAngle()
Custom script: call ApplyKnockbackCoordinates()
Custom script: set udg_KB2D_TouchRadius = I2R(GetUnitCollisionSize())
Destructible - Pick every destructible within KB2D_TouchRadius of KB2D_Loc and do (Actions)
Loop - Actions
Unit - Order KB2D_Cutter to Harvest (Picked destructible)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of KB2D_Cutter) Equal to (Order(harvest))
Then - Actions
Destructible - Kill (Picked destructible)
Else - Actions
Unit - Order KB2D_Cutter to Stop
Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_Key,4,udg_KB2D_Timer + udg_KB2D_Loop)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 5) Less than 2
Then - Actions
Special Effect - Create a special effect at KB2D_Loc using KB2D_SFX
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
Custom script: call DestroyKnockback()
Custom script: call RemoveLocation(udg_KB2D_Loc)
Custom script: endfunction
-------- -------------------------------------------- --------
-------- This function will be run periodically --------
-------- -------------------------------------------- --------
Custom script: function Knockback2DLoop takes nothing returns nothing
Unit Group - Pick every unit in KB2D_LoopGroup and do (Actions)
Loop - Actions
Set KB2D_U = (Picked unit)
Custom script: set udg_KB2D_Key = GetHandleId(udg_KB2D_U)
-------- -------------------------------------------- --------
-------- Load --------
-------- -------------------------------------------- --------
Set KB2D_Angle = (Load 1 of KB2D_Key from KB2D_Hash)
Set KB2D_Duration = (Load 2 of KB2D_Key from KB2D_Hash)
Set KB2D_Distance = (Load 3 of KB2D_Key from KB2D_Hash)
Set KB2D_Timer = (Load 4 of KB2D_Key from KB2D_Hash)
Set KB2D_SFX = (Load 5 of KB2D_Key from KB2D_Hash)
Custom script: call ExecuteFunc("MoveKnockbackUnit")
Custom script: endfunction
-------- -------------------------------------------- --------
-------- Reset Trigger --------
-------- -------------------------------------------- --------
Custom script: function InitKnockback2D takes nothing returns nothing
Custom script: local trigger t = GetTriggeringTrigger()
Custom script: call TriggerClearActions(t)
Custom script: call TriggerAddAction(t, function Knockback2DLoop)
Trigger - Add to (This trigger) the event (Time - Every KB2D_Loop seconds of game time)
[/trigger]

[trigger=Setup]Storm Call Setup
Events
Map initialization
Conditions
Actions
-------- ------------------------------------------------------ --------
-------- Spell (Storm's Call): --------
Set SC_Ability = Storm's Call
-------- Area of effect: --------
Set SC_AoE[1] = 400.00
Set SC_AoE[2] = 400.00
Set SC_AoE[3] = 400.00
-------- ------------------------------------------------------ --------
-------- The arrays (1,2 and 3) they are equal at the level of the sorcery worked by Caster (that is valid for any variable used in this configuration EXCEPT the variables of SC_Model) --------
-------- ------------------------------------------------------ --------
-------- Amount of minimum damage caused by this spell: --------
Set SC_Damage_Minimum[1] = 70.00
Set SC_Damage_Minimum[2] = 130.00
Set SC_Damage_Minimum[3] = 200.00
-------- ------------------------------------------------------ --------
-------- Amount of maximum damage caused by this spell: --------
Set SC_Damage_Maximum[1] = 100.00
Set SC_Damage_Maximum[2] = 174.00
Set SC_Damage_Maximum[3] = 274.00
-------- ------------------------------------------------------ --------
-------- The values of each variable (SC_Damage_Min and SC_Damage_Max) they are values that don't take into account number him/it of affected units for this spell. --------
-------- ------------------------------------------------------ --------
-------- Distance traveled by the unit pushed: --------
Set SC_Distance[1] = 280.00
Set SC_Distance[2] = 340.00
Set SC_Distance[3] = 410.00
-------- ------------------------------------------------------ --------
-------- If the terrestrial unit is on the water, this spell angers to cause: --------
-------- 120% of the normal damage: --------
Set SC_Damage_Extra[1] = 1.20
-------- 130% of the normal damage: --------
Set SC_Damage_Extra[2] = 1.30
-------- 150% of normal damage: --------
Set SC_Damage_Extra[3] = 1.50
-------- ------------------------------------------------------ --------
-------- In the current version (1.3 and in the close ones) a new function that removes the positive and negative buffs of the units areas exists, see: --------
-------- 10% of chance of removing the negative and positive buffs of the unit affected area for this spell: --------
Set SC_Chance_Purge[1] = 10
-------- 18% of chance of removing the negative and positive buffs of the unit affected area for this spell: --------
Set SC_Chance_Purge[2] = 18
-------- 25% of chance of removing the negative and positive buffs of the unit affected area for this spell: --------
Set SC_Chance_Purge[3] = 25
-------- ------------------------------------------------------ --------
-------- Time it takes to travel this distance: --------
Set SC_Timer = 0.90
-------- The value of the variable above (SC_Time = 0,90) it is the normal value of this spell for the unit to travel her distances in that this will be flung. --------
-------- As minor is the time that takes to travel a right one distances, faster the flung unit travels for this distances. --------
-------- Type of attack: --------
Set SC_Type_Attack = Hero
-------- Damage type: --------
Set SC_Type_Damage = Universal
-------- Type of Dummy: --------
Set SC_Type_Dummy = Dummy
-------- ------------------------------------------------------ --------
-------- It is wanted this spell to destroy trees, leave the option the following as true: --------
Set SC_Boolean_Tree = True
-------- In case he/she doesn't want this sorcery to destroy trees, leave the variable above as false. --------
-------- ------------------------------------------------------ --------
-------- One wants to see flotation texts indicating the damage caused by this spell (except armors, abilities...) it marks as true the variable in before: --------
Set SC_Boolean_Text = True
-------- In case he/she doesn't want to see the flotation texts that you/they indicate the basic damage caused by this sorcery, it is enough to mark the variable above as false. --------
-------- ------------------------------------------------------ --------
-------- Models used in my resource: --------
-------- Name of the model used for creation of the special effect 1 of explosion in the land of the terrestrial type: --------
Set SC_Model[1] = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-------- Name of the model used for creation of the special effect 2 of explosion in the land of the terrestrial type: --------
Set SC_Model[2] = abilities\weapons\catapult\catapultmissile.mdl
-------- Name of the model used for creation of the special effect 3 of explosion in the land of the aquatic type: --------
Set SC_Model[3] = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
-------- Name of the model used for the special effect 1 of the electric discharge: --------
Set SC_Model[4] = Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
-------- Name of the model used for the special effect 2 of the electric discharge: --------
Set SC_Model[5] = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-------- Name of the model used for the effect special servant in the unit that is flung by the explosion and when it kills a tree: --------
Set SC_Model[6] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-------- Name of the model used to create the special effect in the unit area that loses all of the negative and positive buffs: --------
Set SC_Model[7] = Abilities\Weapons\DragonHawkMissile\DragonHawkMissile.mdl
-------- ------------------------------------------------------ --------
-------- In this section, I configure some varied on the flotation texts, as duration of the text, size and more. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Boolean_Text Equal to True
Then - Actions
-------- ------------------------------------------------------ --------
-------- Total duration of the flotation text or total life (in seconds) of the flotation text: --------
Set SC_Text_Lifespan = 1.50
-------- Duration so that the flotation text disappears: --------
Set SC_Text_FadingAge = 1.00
-------- Size of the flotation text: --------
Set SC_Text_Size = 11.00
-------- Color of the flotation text: --------
Set SC_Text_Color = |cffFF0000
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- In the current version (1.3 and in the next versions) I use of a single Dummy to verify the affected trees for this sorcery. Therefore, the next stages refer to that, see: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Boolean_Tree Equal to True
Then - Actions
-------- In this section, it is created Dummy that analyzes the type of destructible to be destroyed: --------
-------- ------------------------------------------------------ --------
-------- Initial position in that Dummy will be created: --------
Set SC_Loc[0] = (Center of (Playable map area))
-------- ------------------------------------------------------ --------
-------- Create Dummy: --------
Unit - Create 1 SC_Type_Dummy for Neutral Passive at SC_Loc[0] facing Default building facing degrees
-------- It is worth to observe that this Dummy is the only to verify the types of trees involved in the spell and that this Dummy should not be died. --------
-------- ------------------------------------------------------ --------
-------- Responsible unit for verifying the trees: --------
Set SC_Dummy = (Last created unit)
-------- ------------------------------------------------------ --------
-------- Add the ability "Harvest" so that Dummy can identify the affected trees for this spell: --------
Unit - Add Harvest (Gold and Lumber) to SC_Dummy
-------- ------------------------------------------------------ --------
-------- Remove leaks: --------
Custom script: call RemoveLocation(udg_SC_Loc[0])
-------- ------------------------------------------------------ --------
-------- With this section, it is not more necessary to create a portion of Dummy for each destructible one affected for this spell. Then, this spell becomes more efficient why uses of a single Dummy/Unit to verify trees. --------
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- Don't forget! The used arrays are of extreme importance to identify each property of each variable. --------
-------- ------------------------------------------------------ --------
-------- To reduce the leg that can cause Trigger, use the following custom script: --------
Custom script: call DestroyTrigger (GetTriggeringTrigger())
-------- ------------------------------------------------------ --------
-------- Well, the basic configurations are ready, the rest is with the Trigger Storm Call Cast and Knockback 2D. --------
[/trigger]

[trigger=Cast]Storm Call Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to SC_Ability
Actions
-------- ------------------------------------------------------ --------
-------- In the next action, it is determined the unit that activated the ability Storm's Call: --------
Set SC_Caster = (Triggering unit)
-------- It is worth to observe that Triggering Unit is more efficient than Casting Unit. --------
-------- Which is the level of the ability (Storm Call) what did he work? I determine with the action in before: --------
Set SC_Level = (Level of SC_Ability for SC_Caster)
-------- Position of the land selected by Caster so that it happens the function: --------
Set SC_Loc[1] = (Target point of ability being cast)
-------- The used arrays (as in the case of locations/points) it avoids of creating variables in excess. --------
-------- ------------------------------------------------------ --------
-------- Well, for creation of the special effect in a more detailed way, I decided to add conditions that verify the land type to be chosen with objective. This way, different special effects are created. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at SC_Loc[1] of type Amphibious Pathing is off) Equal to False
(Terrain pathing at SC_Loc[1] of type Buildability is off) Equal to True
Then - Actions
-------- In this part, the effect special servant is when the electric discharge reaches any aquatic surface. --------
-------- ------------------------------------------------------ --------
-------- The effects special servants begin here --------
Special Effect - Create a special effect at SC_Loc[1] using SC_Model[1]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at SC_Loc[1] using SC_Model[3]
Special Effect - Destroy (Last created special effect)
-------- The effects special servants finish here --------
-------- ------------------------------------------------------ --------
-------- In case the land type goes to terrestrial and aquatic units, I added another special effect in this area sees: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at SC_Loc[1] of type Walkability is off) Equal to False
Then - Actions
-------- ------------------------------------------------------ --------
-------- The effects special servants begin here --------
Special Effect - Create a special effect at SC_Loc[1] using SC_Model[2]
Special Effect - Destroy (Last created special effect)
-------- The effects special servants finish here --------
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- It is worth to observe that any leak on this function type was removed --------
-------- ------------------------------------------------------ --------
Else - Actions
-------- In this area, the effects special servants are for terrestrial and possible lands of constructions. --------
-------- ------------------------------------------------------ --------
-------- The effects special servants begin here --------
Special Effect - Create a special effect at SC_Loc[1] using SC_Model[1]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at SC_Loc[1] using SC_Model[2]
Special Effect - Destroy (Last created special effect)
-------- The effects special servants finish here --------
-------- ------------------------------------------------------ --------
-------- It is worth to observe that any leak on this function type was removed --------
-------- ------------------------------------------------------ --------
-------- ------------------------------------------------------ --------
-------- In this area, it is made the actions that destroy trees: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Boolean_Tree Equal to True
Then - Actions
Destructible - Pick every destructible within SC_AoE[SC_Level] of SC_Loc[1] and do (Actions)
Loop - Actions
-------- ------------------------------------------------------ --------
-------- Order that Dummy makes the harvest: --------
Unit - Order SC_Dummy to Harvest (Picked destructible)
-------- ------------------------------------------------------ --------
-------- In this action, it will be verified and destroyed (if possible) the destructible of the type tree: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of SC_Dummy) Equal to (Order(harvest))
((Picked destructible) is alive) Equal to True
Then - Actions
-------- If the conditions above are true, in other words, that the destructible in that Dummy will make the harvest is a tree and this is alive, soon Dummy found the affected tree for this spell. --------
-------- ------------------------------------------------------ --------
-------- Position of the tree: --------
Set SC_Loc[2] = (Position of (Picked destructible))
-------- ------------------------------------------------------ --------
-------- This special effect is created due to the impact and destruction of an affected tree by the discharge: --------
Special Effect - Create a special effect at SC_Loc[2] using SC_Model[6]
Special Effect - Destroy (Last created special effect)
-------- ------------------------------------------------------ --------
-------- Now, kill the tree: --------
Destructible - Kill (Picked destructible)
-------- ------------------------------------------------------ --------
-------- Remove the location (SC_Location[2]) to remove any leaks: --------
Custom script: call RemoveLocation(udg_SC_Loc[2])
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- Order that Dummy stops with his/her current action of harvest: --------
Unit - Order SC_Dummy to Stop
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- In the action in before (For each (Integer A) from 1 to 20, do (Actions)), it is created the special effects of the electric discharge. --------
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
-------- ------------------------------------------------------ --------
-------- I determine the height in that Dummy had been in the air [The value of the height is optional]: --------
Set SC_Height = (Real(((Integer A) x 60)))
-------- ------------------------------------------------------ --------
-------- Creting the Dummy: --------
Unit - Create 1 SC_Type_Dummy for Neutral Passive at SC_Loc[1] facing Default building facing degrees
-------- If it adds 0,00 seconds at the time of life of the it finishes created unit, this won't die and it will cause mistakes hereafter. --------
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-------- I recommend to add a larger value than 0,00. This way, the unit Dummy dies. --------
-------- Another form of avoiding leaks, is to turn the unit explosive Dummy when he/she dies, that means that when she dies, there won't be body of her so that nobody can use (with abilities for instance). --------
Unit - Make (Last created unit) Explode on death
-------- ------------------------------------------------------ --------
-------- Now, modify the height of Dummy for the special effect of the electric discharge: --------
Animation - Change (Last created unit) flying height to SC_Height at 0.00
-------- It is not necessary to modify the rate of Dummy. --------
-------- ------------------------------------------------------ --------
-------- Creating the special effect in Dummy: --------
Special Effect - Create a special effect attached to the chest of (Last created unit) using SC_Model[4]
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Last created unit) using SC_Model[5]
Special Effect - Destroy (Last created special effect)
-------- ------------------------------------------------------ --------
-------- ------------------------------------------------------ --------
-------- I determine the group of units to be diffused: --------
Set SC_Group = (Units within SC_AoE[SC_Level] of SC_Loc[1] matching (((Matching unit) belongs to an enemy of (Owner of SC_Caster)) Equal to True))
-------- Amount of units inside of this certain group (SC_Group): --------
Set SC_Count = (Number of units in SC_Group)
-------- Basic damage caused by this spell: --------
Set SC_Damage_Basic = ((Random real number between SC_Damage_Minimum[SC_Level] and SC_Damage_Maximum[SC_Level]) / (Real(SC_Count)))
-------- Don't forget that the total damage varies for each unit and among the minimum and maximum of damage that it can cause (as damage of 70 - 100). --------
-------- ------------------------------------------------------ --------
-------- The action [set bj_wantDestroyGroup = true] it is to remove leaks, therefore, I use this to proceed: --------
Custom script: set bj_wantDestroyGroup = true
-------- The action [set bj_wantDestroyGroup = true], it should be before the action [Unit Group - Pick every unit in SC_Group and of the (Actions)] --------
-------- ------------------------------------------------------ --------
-------- Now, the units will be diffused: --------
Unit Group - Pick every unit in SC_Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
-------- ------------------------------------------------------ --------
-------- Position of the affected unit for this sorcery: --------
Set SC_Loc[3] = (Position of (Picked unit))
-------- Being verified the unit is or don't remain the water: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at SC_Loc[3] of type Amphibious Pathing is off) Equal to False
(Terrain pathing at SC_Loc[3] of type Buildability is off) Equal to True
Then - Actions
-------- ------------------------------------------------------ --------
-------- In this area, the caused damage is increased due to the fact that the unit that this placed on the water. And as in the Physics, the water reduces the resistance of a body on the electricity, then I decided to act this way: --------
-------- ------------------------------------------------------ --------
-------- Before determining this type of increased damage, it is worth to observe that the unit area is not on the water: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A flying unit) Equal to True
Then - Actions
-------- ------------------------------------------------------ --------
Set SC_Damage_Total = SC_Damage_Basic
-------- ------------------------------------------------------ --------
-------- Don't forget about the new function of this sorcery that guarantees the chance of the thunder to remove the negative and positive buffs of units areas: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to SC_Chance_Purge[SC_Level]
Then - Actions
-------- If the chance is true and / or it happens in way well happened, the buffs of the unit area is removed: --------
-------- ------------------------------------------------------ --------
-------- Effect special servant when the electric discharge removes the buffs of the unit affected area for this spell: --------
Special Effect - Create a special effect attached to the chest of (Picked unit) using SC_Model[7]
Special Effect - Destroy (Last created special effect)
-------- ------------------------------------------------------ --------
-------- Finally, remove the buffs: --------
Unit - Remove All buffs from (Picked unit)
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
Else - Actions
-------- In case the unit is terrestrial/aquatic: --------
Set SC_Damage_Total = (SC_Damage_Basic x SC_Damage_Extra[SC_Level])
-------- ------------------------------------------------------ --------
Else - Actions
-------- In case the unit is not on the water: --------
Set SC_Damage_Total = SC_Damage_Basic
-------- ------------------------------------------------------ --------
-------- Removing the location: --------
Custom script: call RemoveLocation(udg_SC_Loc[3])
-------- ------------------------------------------------------ --------
-------- Use the following action to punish the caught unit: --------
Unit - Cause SC_Caster to damage (Picked unit), dealing SC_Damage_Total damage of attack type SC_Type_Attack and damage type SC_Type_Damage
-------- In the previous versions (1.1 and 1.0) two actions that punished both units existed (organic and no-organic). However, in the version 1.2 (and in the close ones), a single action is enough to punish both units (organic and no-organic). --------
-------- ------------------------------------------------------ --------
-------- To proceed, if he/she wants to see her/it the flotation texts: --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Boolean_Text Equal to True
Then - Actions
-------- ------------------------------------------------------ --------
-------- Determine the group that will see the texts flotation servants (in the case he/she is the player that controls SC_Caster): --------
Set SC_PlayerGroup = (Player group((Owner of SC_Caster)))
-------- ------------------------------------------------------ --------
-------- Create the flotation text: --------
Floating Text - Create floating text that reads (SC_Text_Color + (String((Integer(SC_Damage_Total))))) above (Picked unit) with Z offset 0.00, using font size SC_Text_Size, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-------- Hide the players' flotation text of all: --------
Floating Text - Hide (Last created floating text) for (All players)
-------- Show the flotation text JUST for the player that controls SC_Caster: --------
Floating Text - Show (Last created floating text) for SC_PlayerGroup
-------- ------------------------------------------------------ --------
-------- The actions below are for the removal of leaks that you/they can be created with flotation texts: --------
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to SC_Text_Lifespan seconds
Floating Text - Change the fading age of (Last created floating text) to SC_Text_FadingAge seconds
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
-------- ------------------------------------------------------ --------
-------- Remove leaks: --------
Custom script: call DestroyForce(udg_SC_PlayerGroup)
Custom script: set udg_SC_PlayerGroup = null
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- In the next stage, the effect of Knockback had happened in the terrestrial units that you/they were affected for this sorcery (Storm's Call): --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A town-hall-type unit) Equal to False
((Picked unit) is Magic Immune) Equal to False
((Picked unit) is Mechanical) Equal to False
((Picked unit) is A structure) Equal to False
Then - Actions
-------- In this section of this action, the units organic, flying and no immune the magic will be affected for the spell Storm's Call: --------
-------- ------------------------------------------------------ --------
-------- The effects special servants begin here --------
Special Effect - Create a special effect attached to the chest of (Picked unit) using SC_Model[4]
Special Effect - Destroy (Last created special effect)
-------- The effects special servants finish here --------
-------- ------------------------------------------------------ --------
-------- This area is to determine that unit will be flung by the discharge. --------
-------- Unit to be pushed: --------
Set KB2D_Target = (Picked unit)
-------- It is worth to observe that the unit "Picked unit" is equal the affected unit for this sorcery (Storm's Call). --------
Custom script: set udg_KB2D_TempKey = GetHandleId(udg_KB2D_Target)
-------- I model that will create the special effect in the unit that is thrown: --------
Set KB2D_SFX = SC_Model[6]
-------- Distance to be traveled by the caught unit: --------
Set KB2D_Distance = SC_Distance[SC_Level]
-------- Time that she had taken to travel this distance: --------
Set KB2D_Duration = SC_Timer
-------- Target point of ability being cast: --------
Set KB2D_Loc = SC_Loc[1]
-------- Position of the caught unit: --------
Set KB2D_Offset = (Position of KB2D_Target)
-------- Angle among the points (so that direction the unit footprint will be flung): --------
Set KB2D_Angle = (Angle from KB2D_Loc to KB2D_Offset)
-------- ------------------------------------------------------ --------
-------- Call Trigger (KnockBack 2D) to work: --------
Custom script: call ExecuteFunc("ApplyKnockbackEffect")
-------- ------------------------------------------------------ --------
-------- Removing the leaks (the removal of leaks improvement the acting of this and of any function): --------
Custom script: call RemoveLocation(udg_KB2D_Offset)
Custom script: call RemoveLocation(udg_KB2D_Loc)
-------- ------------------------------------------------------ --------
-------- The knockback Effect is given by the trigger Knockback 2D of Radamantus. --------
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
Else - Actions
-------- If an or more conditions above are false, it is not necessary to do anything in this section. It is worth to remind that it is not necessary to use the action "Do nothing." --------
-------- ------------------------------------------------------ --------
-------- Removing the location: --------
Custom script: call RemoveLocation(udg_SC_Loc[1])
-------- ------------------------------------------------------ --------
-------- See that the removal of leaks improvement the acting of the spell. --------
-------- ------------------------------------------------------ --------
[/trigger]


Import

To import this spell, you should copy the triggers Storm Call Cast, Storm Call Setup and Knockback2D. Soon afterwards, copy the unit Dummy (he/she doesn't forget about the imported model Dummy.mdl) and the ability Storm's Call.

Gratitudes

I thank my adorable GOD, JESUS CHRIST and to the GOD's HOLY SPIRIT (it goes everything) to them to can, it honors and eternal glory!;
Blizzard (it goes the resources of Warcraft);
To HiveworkShop;
To Radamantus (it goes Knockback 2D);
To the moderator (it goes the pieces of advice);
To you! (it goes commenting on, to suggest, to say and to participate)

Contact

Be what goes, don't stop commenting on, to criticize, to say and to suggest. Don't forget to talk with me in Hive.
Contents

Storm's Call (Map)

Reviews
Approved Suggested changes: Use only one tree checker unit throughout the game, don't kill it Make Integer A loop count configurable Required changes: Set the dummy's death type to Can't raise, does not decay in object editor The...

Moderator

M

Moderator

Reviewed by Maker, Storm's Call v1.4, 30th Jan 2013

Approved

Suggested changes:
  • Use only one tree checker unit throughout the game, don't kill it
  • Make Integer A loop count configurable

Reviewed by Maker, Storm's Call (v1.1), 14th Jan 2013

Required changes:
  • Set the dummy's death type to Can't raise, does not decay in object editor
  • The unit group is destroyed too early by placing Custom script: set bj_wantDestroyGroup = true before Set SC_Count = (Number of units in SC_Group)
    The spell won't work. Move the bj after the number of units thing.

Suggested changes:
  • You could store picked into a variable in the unit group loop, and use the variable
  • The grammar in tooltip could be improved
  • Make Integer A loop count configurable

12:21, 10th Jan 2013
Magtheridon96:

  • You don't need the "A unit dies" trigger. You can set the death time of the dummies to 0.00 seconds. Maker and I were discussing the leakiness of this thing, and it turns out, no matter what you do, unless you remove the unit, it will remain depending on its death time. You are free to stop creating these types of triggers. Just set the death time of the dummy to 0.00 seconds. I was wrong all these months.
  • Set SC_Caster = No unit <- You don't need this line.
  • Inside the loop of the Cast trigger, you can cache the (Last created unit) directly after you create it to avoid repeating the function call multiple times.
  • Excellent configuration you got there.
  • Set SC_Count = (Number of units in SC_Group) <- You should not do this inside the Group enumeration loop. Since the number of units will remain constant through each iteration, you should do it outside the loop:
    Set SC_Group = (Units within SC_AoE[SC_Level] of SC_Loc matching (((Matching unit) belongs to an enemy of (Owner of SC_Caster)) Equal to True))
    Set SC_Count = (Number of units in SC_Group)
    Unit Group - Pick every unit in SC_Group and do (Actions)
    Loop
    blablabla[/trigger]
 
Top