- Joined
- Jun 20, 2014
- Messages
- 552
Thank you Tank-Commander i will do it.
Why is it called Zephyr Contest and not Spell Contest?
Why is it called Zephyr Contest and not Spell Contest?
Guess that's because contest is a rather short one - create single spell, test it and submit in the thread. Currently it lasts for period of a month, so it's not really a "quick" contest anymore. It had duration of 7 days previously, if I'm not mistaken.
Gonna talk to Ralle about bananas.
Spinnaker is a nickname of one of famous hackers : )Directly from RL? I can not pronounce 'R' correctly, thus with my Polish accent that word usually ends up being more of "banana" that actually "bannar" when coming from my mouth. Bannar is a nickname taken from Diablo3 universe, Chieftain of Berserkers clan, tribe of Barbarian nation. Took it because Spinnaker was already taken by my twin brother.
Yes it does. "Zephyr" is another word for 'wind', which has connotations of speed and alacrity; so for a "quick" spell contest, that's a fine name.Banana, that doesn't explain the name origin.
That's more like a spell set than one spell.
That's more like a spell set than one spell.
If instead, you made Fan of Knives / Blink / Avatar of Vengeance purely "illusion" based (i.e. no damage/effect), you could get away with it.
You know, thank you, but that's just a few lines of code and some dummy abilities, whereas I add a deception effect, since your enemy does not know whether an ability is an illusion, doing no harm, or whether you ended Trance and it is harming your enemy's unit.
Shape Shift |
Tool TipShape Shift
Icon![]()
After a short delay, the caster will morph into the targeted enemy unit or destructible, retaining the original target's HP, Mana & ownership with an added inventory. Deactivation maims for 5 seconds and damages nearby enemies within a 300 AoE. While Shape Shifting, the caster has the option to BackStab, which returns ownership to the caster.
Level 1 - 100 mana, 1 inventory slot, 50% maim, deals 250 damage, lasts 30 seconds.
Level 2 - 150 mana, 3 inventory slots, 60% maim, deals 450 damage, lasts 40 seconds.
Level 3 - 200 mana, 6 inventory slots, 70% maim, deals 650 damage, lasts 50 seconds.
Unable to morph into other Heroes or Invulnerable Structures.
Triggers
ShapeShift Setup
Events
Map initialization
Conditions
Actions
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- These variables can be configuired to how you like to suit your preferences. --------
-------- NOTE: Maim per level must be adjusted in the object editor. --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- COPY HP & MANA OR RETAIN HP & MANA ---------- This option allows you to choose whether or not you copy the target's hp and mana, or the Shifter's hp and mana percentages are transfered over. --------
Set SS_Config_RetainHPMANA = False
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- DUMMY TYPE --------
-------- This is dummy is the two explosions, smoke puff and green smoke all in one. --------
Set SS_DummyUnitType = SS Dummy
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This dummy is the "Zombify" sfx. It requires a seprate unit for animations. --------
Set SS_TransfDummyUnitType = SS TransformDummy
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This dummy is the Controller Unit. It requires a seprate unit for portrait visiblity. --------
Set SS_ControllerDummyUnitType = Shape Shift (Command Dummy)
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- NO DAMAGE ON DEATH ---------- When this is set to true, anytime a ShapeShift's diguise is killed, it will not set off the damage and slow. --------
-------- ----------------------------------------------------- Although, when this is set to true and the Hero runs out of time, it will trigger the damage and slow as normal. --------
Set SS_Config_NO_DamageOnDeath = False
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- SPELL ALOCATION --------
Set SS_Config_ABIL_Main = Shape Shift
Set SS_Config_ABIL_DummySlow = Shape Shift (Dummy Slow)
Set SS_Config_ABIL_DropItem = Drop Item
Set SS_Config_ABIL_BackStab = Back Stab
Set SS_Config_ABIL_Invent = SS Inventory
Set SS_Config_ABIL_StopShift = Stop Shape Shift
Set SS_Config_ABIL_DisableEXPnGOLD = SS SpellBook
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- INVENTORY SIZE --------
Set SS_Config_Levels_InventorySize[1] = 1
Set SS_Config_Levels_InventorySize[2] = 3
Set SS_Config_Levels_InventorySize[3] = 6
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- DELAY TIME --------
-------- This part sets the delay time. You must also edit the "Follow Through Time" in the spell object. --------
Set SS_Config_Levels_DelayTime[1] = 1.00
Set SS_Config_Levels_DelayTime[2] = 1.00
Set SS_Config_Levels_DelayTime[3] = 1.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- DURATION --------
Set SS_Config_Levels_Duration[1] = 30.00
Set SS_Config_Levels_Duration[2] = 40.00
Set SS_Config_Levels_Duration[3] = 50.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- DAMAGE --------
Set SS_Config_Levels_Damage[1] = 250.00
Set SS_Config_Levels_Damage[2] = 450.00
Set SS_Config_Levels_Damage[3] = 650.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- AREA OF EFFECT --------
Set SS_Config_Levels_AoE[1] = 300.00
Set SS_Config_Levels_AoE[2] = 300.00
Set SS_Config_Levels_AoE[3] = 300.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- DUMMY SIZE ---------- This allows you to control the size of the explosion dummies, adjust by eye per level based on the AoE. --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- ---------------------------------- This only effects the Earth Nova effect --------
Set SS_Config_Levels_ExplodeSize[1] = 50.00
Set SS_Config_Levels_ExplodeSize[2] = 50.00
Set SS_Config_Levels_ExplodeSize[3] = 50.00
-------- ---------------------------------- This only effects the Ancient Explosion effect --------
Set SS_Config_Levels_ExplodeSize2[1] = 100.00
Set SS_Config_Levels_ExplodeSize2[2] = 100.00
Set SS_Config_Levels_ExplodeSize2[3] = 100.00
-------- ---------------------------------- This only effects the Berserker Target effect --------
Set SS_Config_SFX_Finnish_Size = 200.00
-------- ---------------------------------- This only effects the Mirror Image Death effect --------
Set SS_Config_SFX_Smoke_Size = 300.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- TRANSFORM SPX CONFIGUIRATIONS ---------- This allows to manipulate effects of the Transformation_Dummy --------
Set SS_Config_SFX_TransfHeight = 300.00
Set SS_Config_SFX_Transf_Size = 100.00
Set SS_Config_SFX_TransfThickness = 10
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- MODELS ---------- This allows to change the effects of the explosions, smoke puffs and transformation finnsh SFX. --------
Set SS_Config_SFX_ExplosionModel = war3mapImported\EarthNova.mdl
Set SS_Config_SFX_ExplosionModel2 = war3mapImported\AncientExplode.mdl
Set SS_Config_SFX_FinnishModel = Abilities\Spells\Orc\Berserker\Berserkertarget.mdl
Set SS_Config_SFX_SmokeModel = Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- SMOKE ---------- This increases the thickness & size of the "smoke puff" to make it more visible. --------
Set SS_Config_SFX_SmokeThickness = 3
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- COLOURS --------
-------- This controls (Earth Nova) --------
Set SS_Config_SFX_Explo_Red = 100.00
Set SS_Config_SFX_Explo_Green = 100.00
Set SS_Config_SFX_Explo_Blue = 100.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This controls (Ancient Explosion) --------
Set SS_Config_SFX_Explo2_Red = 100.00
Set SS_Config_SFX_Explo2_Green = 100.00
Set SS_Config_SFX_Explo2_Blue = 100.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This is controls the colour of the fog that the Hero is enveloped in during Transformation. --------
Set SS_Config_SFX_Transf_Red = 100.00
Set SS_Config_SFX_Transf_Green = 100.00
Set SS_Config_SFX_Transf_Blue = 100.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This is controls the colour of the green smoke that appears after completeing the transformation. --------
Set SS_Config_SFX_Finnish_Red = 100.00
Set SS_Config_SFX_Finnish_Green = 100.00
Set SS_Config_SFX_Finnish_Blue = 100.00
-------- AOE SCAN MAX SIZE ---------- This part sets the maximum AoE size for the initial cast. It should match the size of the targeting image. --------
-------- ----------------------------------------------- You will notice that it is 185 instead of 150 (like in object editor), this is because the game has trouble detecting destructibles in a circle. --------
Set SS_AoE_Scan_MaxSize = 185
Set SS_AoE_Scan_NormalSize = 150.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- ITEM PICKUP RANGE ---------- This part should match "Inventory Pickup Item Range" in the game play constants. --------
Set SS_Config_ItemGrabRange = 150.00
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This is to hide the dummy reincarnation and resistant skin. The dummy reincarnation is to deny any player of the bounty and experience points of the shapeshift unit. --------
-------- Resistant skin prevents charm, possesion, transmute, devour and other powerful abilities. --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 1 (Red)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 2 (Blue)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 3 (Teal)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 4 (Purple)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 5 (Yellow)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 6 (Orange)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 7 (Green)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 8 (Pink)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 9 (Gray)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 10 (Light Blue)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 11 (Dark Green)
Player - Disable SS_Config_ABIL_DisableEXPnGOLD for Player 12 (Brown)
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
ShapeShift Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to SS_Config_ABIL_Main
((Casting unit) is in SS_ActionGroup) Equal to False
((Casting unit) is in SS_AnimationGroup) Equal to False
Actions
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- The extra conditions to this is to avoid cooldown refreshing shenanigans to stack and bug this spell. --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_TempPoint[1] = (Target point of ability being cast)
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Checking if there are any valid Targets, if there are not, then skip the rest of the trigger --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Destructible - Pick every destructible within SS_AoE_Scan_NormalSize of SS_TempPoint[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked destructible) is alive) Equal to True
Then - Actions
Set SS_TempDestructible = (Picked destructible)
Else - Actions
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part has the conditon requirements, it only looks for non-Heros, alive non-Ally units and unit's that don't have Invulnerable (Netural) --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
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 (Units within SS_AoE_Scan_NormalSize of SS_TempPoint[1] matching ((((((Matching unit) is alive) Equal to True) and ((Level of Invulnerable (Neutral) for (Matching unit)) Equal to 0)) and (((Matching unit) is A Hero) Equal to False)) and (( Greater than 0
SS_TempDestructible Not equal to No destructible
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Setting caster in variable and clearing the Temp Destructible. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_TempDestructible = No destructible
Set SS_Index = (SS_Index + 1)
Set SS_Caster[SS_Index] = (Casting unit)
Set SS_AbilityLevel[SS_Index] = (Level of SS_Config_ABIL_Main for SS_Caster[SS_Index])
Set SS_Point[SS_Index] = (Position of SS_Caster[SS_Index])
Set SS_ItemTarget[SS_Index] = No item
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Scanning for the target closest to the centre of the target point. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_AoE_Scan = 0.00
For each (Integer A) from 1 to SS_AoE_Scan_MaxSize, do (Actions)
Loop - Actions
Set SS_AoE_Scan = (SS_AoE_Scan + 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
SS_TempTargetUnit Equal to No unit
SS_TempDestructible Equal to No destructible
Then - Actions
Set SS_TempTargetUnit = (Random unit from (Units within SS_AoE_Scan of SS_TempPoint[1] matching (((((Owner of (Matching unit)) Equal to Neutral Passive) or (((Matching unit) belongs to an enemy of (Owner of SS_Caster[SS_Index])) Equal to True)) and ((((Matching unit) is alive) Equal
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part has the conditon requirements, it only looks for non-Heros, alive non-Ally units and unit's that don't have Invulnerable (Netural) --------
-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
SS_TempTargetUnit Equal to No unit
SS_TempDestructible Equal to No destructible
Then - Actions
Destructible - Pick every destructible within SS_AoE_Scan of SS_TempPoint[1] and do (Actions)
Loop - Actions
Set SS_TempDestructible = (Picked destructible)
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if target is a destructible --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_TempDestructible Not equal to No destructible
Then - Actions
Set SS_TargetHp[SS_Index] = (Current life of SS_TempDestructible)
Set SS_DestructibleType[SS_Index] = (Destructible-type of SS_TempDestructible)
-------- ---------------------------------------------- --------
Set SS_OriginalOwner[SS_Index] = (Owner of No unit)
Set SS_TargetMana[SS_Index] = SS_TargetMana[SS_Index]
Set SS_UnitType[SS_Index] = No unit-type
Set SS_TempDestructible = No destructible
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if target is a unit --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_TempTargetUnit Not equal to No unit
Then - Actions
Set SS_OriginalOwner[SS_Index] = (Owner of SS_TempTargetUnit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Config_RetainHPMANA Equal to False
Then - Actions
Set SS_TargetHp[SS_Index] = (Life of SS_TempTargetUnit)
Set SS_TargetMana[SS_Index] = (Mana of SS_TempTargetUnit)
Else - Actions
Set SS_TargetHp[SS_Index] = (Percentage life of SS_Caster[SS_Index])
Set SS_TargetMana[SS_Index] = (Percentage mana of SS_Caster[SS_Index])
Set SS_UnitType[SS_Index] = (Unit-type of SS_TempTargetUnit)
-------- ---------------------------------------------- --------
Set SS_DestructibleType[SS_Index] = (Destructible-type of No destructible)
Set SS_TempTargetUnit = No unit
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Creating Special Effect --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_DelayDuration[SS_Index] = SS_Config_Levels_DelayTime[SS_AbilityLevel[SS_Index]]
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part sets the Duration. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_TimeLimit[SS_Index] = SS_Config_Levels_Duration[SS_AbilityLevel[SS_Index]]
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_Special_Effect_Height = 0.00
Unit Group - Add SS_Caster[SS_Index] to SS_AnimationGroup
For each (Integer A) from 1 to SS_Config_SFX_TransfThickness, do (Actions)
Loop - Actions
Unit - Create 1 SS_TransfDummyUnitType for (Owner of SS_Caster[SS_Index]) at SS_Point[SS_Index] facing (Random angle) degrees
Unit Group - Add (Last created unit) to SS_Special_Effect_TempGroup
Animation - Change (Last created unit)'s size to (SS_Config_SFX_Transf_Size%, SS_Config_SFX_Transf_Size%, SS_Config_SFX_Transf_Size%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Transf_Red%, SS_Config_SFX_Transf_Green%, SS_Config_SFX_Transf_Blue%) with 0.00% transparency
Animation - Change (Last created unit) flying height to SS_Special_Effect_Height at 0.00
Animation - Play (Last created unit)'s birth animation
Set SS_Special_Effect_Height = (SS_Special_Effect_Height + (SS_Config_SFX_TransfHeight / (Real(SS_Config_SFX_TransfThickness))))
Set SS_SpecialEffectGroup[SS_Index] = (Random 10 units from SS_Special_Effect_TempGroup)
Unit Group - Add all units of SS_Special_Effect_TempGroup to SS_SpecialEffectGroup[SS_Index]
Unit Group - Remove all units from SS_Special_Effect_TempGroup
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Turning on the special effects part of the spell --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in SS_AnimationGroup) Equal to 1
Then - Actions
Trigger - Turn on ShapeShift Animation Loop <gen>
Else - Actions
Else - Actions
Custom script: call RemoveLocation (udg_SS_TempPoint[1])
ShapeShift Animation Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in SS_AnimationGroup and do (Actions)
Loop - Actions
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Equal to SS_Caster[SS_Loop]
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if caster is still in animating the special effect and is still alive. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(SS_Caster[SS_Loop] is alive) Equal to True
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to True
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to False
Then - Actions
Set SS_DelayDuration[SS_Loop] = (SS_DelayDuration[SS_Loop] - 0.03)
Unit Group - Pick every unit in SS_SpecialEffectGroup[SS_Loop] and do (Actions)
Loop - Actions
Set SS_TempPoint[4] = (Position of SS_Caster[SS_Loop])
Unit - Move (Picked unit) instantly to SS_TempPoint[4], facing SS_TempPoint[4]
Custom script: call RemoveLocation (udg_SS_TempPoint[4])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of (Picked unit)) Less than or equal to SS_Config_SFX_TransfHeight
Then - Actions
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((SS_Config_SFX_TransfHeight x 0.01) x 2.00)) at 10000.00
Else - Actions
Animation - Change (Picked unit) flying height to 0.00 at 0.00
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part de-indexes and removes the caster from the spell. He/she has failed to transform in time and has died. :( --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit Group - Remove SS_Caster[SS_Loop] from SS_AnimationGroup
Unit Group - Pick every unit in SS_SpecialEffectGroup[SS_Loop] and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Unit Group - Remove (Picked unit) from SS_SpecialEffectGroup[SS_Loop]
Custom script: call DestroyGroup (udg_SS_SpecialEffectGroup[udg_SS_Loop])
Custom script: call RemoveLocation (udg_SS_Point[udg_SS_Loop])
Set SS_ItemTarget[SS_Loop] = SS_ItemTarget[SS_Index]
Set SS_AbilityLevel[SS_Loop] = SS_AbilityLevel[SS_Index]
Set SS_BackPack[SS_Loop] = SS_BackPack[SS_Index]
Set SS_TimeLimit[SS_Loop] = SS_TimeLimit[SS_Index]
Set SS_StoredEXP[SS_Loop] = SS_StoredEXP[SS_Index]
Set SS_Caster[SS_Loop] = SS_Caster[SS_Index]
Set SS_Point[SS_Loop] = SS_Point[SS_Index]
Set SS_Command_Unit[SS_Loop] = SS_Command_Unit[SS_Index]
Set SS_TargetHp[SS_Loop] = SS_TargetHp[SS_Index]
Set SS_DelayDuration[SS_Loop] = SS_DelayDuration[SS_Index]
Set SS_SpecialEffectGroup[SS_Loop] = SS_SpecialEffectGroup[SS_Index]
Set SS_ShapeShiftUnit[SS_Loop] = SS_ShapeShiftUnit[SS_Index]
Set SS_OriginalOwner[SS_Loop] = SS_OriginalOwner[SS_Index]
Set SS_TargetMana[SS_Loop] = SS_TargetMana[SS_Index]
Set SS_UnitType[SS_Loop] = SS_UnitType[SS_Index]
Set SS_Destructible[SS_Loop] = SS_Destructible[SS_Index]
Set SS_DestructibleType[SS_Loop] = SS_DestructibleType[SS_Index]
Set SS_Index = (SS_Index - 1)
Set SS_Loop = (SS_Loop - 1)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if trigger is ready to be turned off. There is no point having this trigger running if no one is animating the ShapeShift. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in SS_AnimationGroup) Equal to 0
Then - Actions
Game - Display to (All players) for 0.01 seconds the text: ANIMATION LOOP OFF
Trigger - Turn off (This trigger)
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if caster is done with the animation. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
SS_DelayDuration[SS_Loop] Less than or equal to 0.00
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to True
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to False
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part means the Animation part is over and it's time to create the clone. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Clearing animation dummies. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit Group - Pick every unit in SS_SpecialEffectGroup[SS_Loop] and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Unit Group - Remove (Picked unit) from SS_SpecialEffectGroup[SS_Loop]
Custom script: call DestroyGroup (udg_SS_SpecialEffectGroup[udg_SS_Loop])
Set SS_Point[SS_Loop] = (Position of SS_Caster[SS_Loop])
Unit Group - Remove SS_Caster[SS_Loop] from SS_AnimationGroup
Unit Group - Add SS_Caster[SS_Loop] to SS_ActionGroup
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking whether or not target is a destructible or a unit. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_UnitType[SS_Loop] Not equal to No unit-type
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This is the experience storage variable. --------
Set SS_StoredEXP[SS_Loop] = 0
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This is the back pack. Used for storage of the caster's original items. This disables items such as immolation and auras. --------
-------- I have tested with doom and it doesn't not work well with Hiding and Locust. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Create 1 SS_ControllerDummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees
Set SS_BackPack[SS_Loop] = (Last created unit)
Unit - Set level of SS Inventory for SS_BackPack[SS_Loop] to 6
Set SS_ItemLoop = 1
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Drop the item from slot SS_ItemLoop of SS_Caster[SS_Loop]
Hero - Give (Last dropped item) to SS_BackPack[SS_Loop]
Set SS_ItemLoop = (SS_ItemLoop + 1)
Unit - Make SS_BackPack[SS_Loop] Invulnerable
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Hide SS_Caster[SS_Loop]
Unit - Create 1 SS_UnitType[SS_Loop] for SS_OriginalOwner[SS_Loop] at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees
Unit - Order (Last created unit) to Hold Position
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This spell book contains the reincarnation ability and resistant skin. --------
Unit - Add SS SpellBook to (Last created unit)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This removes the ShapeShiftUnit from the game when it uses reincarnation. Denying Gold & EXP --------
-------- I suggest replacing this with Bribe's Unit Event System --------
-------- [url]http://www.hiveworkshop.com/forums/spells-569/unit-event-v2-0-0-1-a-201641/?prev=d%3Dlist%26r%3D20%26u%3Dbribe[/url] --------
Trigger - Add to Shape Shift Deny Xp and Gold <gen> the event (Unit - (Last created unit)'s life becomes Less than or equal to 0.41)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part adjusts the flying height accordingly. If you are a flying Hero, you will descend when turning into a ground unit and vice versa --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_ShapeShiftUnit[SS_Loop] = (Last created unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(SS_ShapeShiftUnit[SS_Loop] is A flying unit) Equal to True
(Default flying height of SS_ShapeShiftUnit[SS_Loop]) Greater than 0.00
Then - Actions
Animation - Change SS_ShapeShiftUnit[SS_Loop] flying height to (Default flying height of SS_Caster[SS_Loop]) at 0.00
Animation - Change SS_ShapeShiftUnit[SS_Loop] flying height to (Default flying height of SS_ShapeShiftUnit[SS_Loop]) at 300.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(SS_Caster[SS_Loop] is A flying unit) Equal to True
(Default flying height of SS_Caster[SS_Loop]) Greater than 0.00
Then - Actions
Custom script: if UnitAddAbility(udg_SS_ShapeShiftUnit[udg_SS_Loop],'Amrf') then
Animation - Change SS_ShapeShiftUnit[SS_Loop] flying height to (Default flying height of SS_Caster[SS_Loop]) at 0.00
Animation - Change SS_ShapeShiftUnit[SS_Loop] flying height to (Default flying height of SS_ShapeShiftUnit[SS_Loop]) at 500.00
Custom script: call UnitRemoveAbility(udg_SS_ShapeShiftUnit[udg_SS_Loop],'Amrf')
Custom script: endif
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part passes over the HP and Mana of the original. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Config_RetainHPMANA Equal to False
Then - Actions
Unit - Set life of SS_ShapeShiftUnit[SS_Loop] to SS_TargetHp[SS_Loop]
Unit - Set mana of SS_ShapeShiftUnit[SS_Loop] to SS_TargetMana[SS_Loop]
Else - Actions
Unit - Set life of SS_ShapeShiftUnit[SS_Loop] to SS_TargetHp[SS_Loop]%
Unit - Set mana of SS_ShapeShiftUnit[SS_Loop] to SS_TargetMana[SS_Loop]%
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Unhide SS_Caster[SS_Loop]
Unit - Turn collision for SS_Caster[SS_Loop] Off
Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop]
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Adding Locust "Aloc" is the way to remove the Hero from minimap vision. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Custom script: call UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Aloc')
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Create 1 SS_ControllerDummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees
Set SS_Command_Unit[SS_Loop] = (Last created unit)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part sets the Duration and the level of inventory of the Control Unit. --------
-------- Note that the expiry timer has an extra 0.5 seconds. This is so that the expiry timer itself, does not cause the Controller to die. --------
-------- It is purely visual aide to see when the time is almost up. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Set level of SS_Config_ABIL_Invent for SS_Command_Unit[SS_Loop] to SS_Config_Levels_InventorySize[SS_AbilityLevel[SS_Loop]]
Unit - Set level of SS_Config_ABIL_StopShift for SS_Command_Unit[SS_Loop] to SS_AbilityLevel[SS_Loop]
Unit - Add a (SS_TimeLimit[SS_Loop] + 0.50) second Generic expiration timer to SS_Command_Unit[SS_Loop]
Unit - Turn collision for SS_Command_Unit[SS_Loop] Off
Unit - Make SS_Command_Unit[SS_Loop] Invulnerable
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part hides the Controller and Caster from sight by increasing the flying height to a ridiculously large number. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This method is the safe way to make a unit fly. See this link for more info. [url]http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/how-give-unit-ability-fly-201936/[/url] --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Custom script: if UnitAddAbility(udg_SS_Command_Unit[udg_SS_Loop],'Amrf') then
Animation - Change SS_Command_Unit[SS_Loop] flying height to 1000000000.00 at 0.00
Custom script: call UnitRemoveAbility(udg_SS_Command_Unit[udg_SS_Loop],'Amrf')
Custom script: endif
Custom script: if UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Amrf') then
Animation - Change SS_Caster[SS_Loop] flying height to 1000000000.00 at 0.00
Custom script: call UnitRemoveAbility(udg_SS_Caster[udg_SS_Loop],'Amrf')
Custom script: endif
Custom script: if UnitAddAbility(udg_SS_BackPack[udg_SS_Loop],'Amrf') then
Animation - Change SS_BackPack[SS_Loop] flying height to 1000000000.00 at 0.00
Custom script: call UnitRemoveAbility(udg_SS_Caster[udg_SS_Loop],'Amrf')
Custom script: endif
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This special effect is a hidden resource in WC3, to find more visit this page. [url]http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/list-hidden-material-within-world-editor-6365/[/url] --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Create 1 SS_DummyUnitType for Neutral Passive at SS_Point[SS_Loop] facing (Random angle) degrees
Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)
Animation - Change (Last created unit)'s size to (SS_Config_SFX_Finnish_Size%, SS_Config_SFX_Finnish_Size%, SS_Config_SFX_Finnish_Size%) of its original size
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_FinnishModel
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Finnish_Red%, SS_Config_SFX_Finnish_Green%, SS_Config_SFX_Finnish_Blue%) with 0.00% transparency
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Regardless if the target is a Unit or a Destructible, you must create variables for both so De-indexing works properly. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_Destructible[SS_Loop] = No destructible
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_DestructibleType[SS_Loop] Not equal to (Destructible-type of No destructible)
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This is the experience storage variable. --------
Set SS_StoredEXP[SS_Loop] = 0
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Create 1 SS_ControllerDummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees
Set SS_BackPack[SS_Loop] = (Last created unit)
Unit - Set level of SS Inventory for SS_BackPack[SS_Loop] to 6
Set SS_ItemLoop = 1
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Drop the item from slot SS_ItemLoop of SS_Caster[SS_Loop]
Hero - Give (Last dropped item) to SS_BackPack[SS_Loop]
Set SS_ItemLoop = (SS_ItemLoop + 1)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Hide SS_Caster[SS_Loop]
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- This part creates the destructible and set the hp of it. --------
Destructible - Create a SS_DestructibleType[SS_Loop] at SS_Point[SS_Loop] facing (Random angle) with scale 1.00 and variation (Random integer number between 1 and 10)
Set SS_Destructible[SS_Loop] = (Last created destructible)
Destructible - Set life of SS_Destructible[SS_Loop] to SS_TargetHp[SS_Loop]
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Everything below here is the same as above. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Unhide SS_Caster[SS_Loop]
Unit - Turn collision for SS_Caster[SS_Loop] Off
Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop]
Custom script: call UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Aloc')
Unit - Create 1 SS_ControllerDummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees
Set SS_Command_Unit[SS_Loop] = (Last created unit)
Unit - Remove Back Stab from SS_Command_Unit[SS_Loop]
Unit - Set level of SS_Config_ABIL_Invent for SS_Command_Unit[SS_Loop] to SS_Config_Levels_InventorySize[SS_AbilityLevel[SS_Loop]]
Unit - Set level of SS_Config_ABIL_StopShift for SS_Command_Unit[SS_Loop] to SS_AbilityLevel[SS_Loop]
Unit - Add a (SS_TimeLimit[SS_Loop] + 0.50) second Generic expiration timer to SS_Command_Unit[SS_Loop]
Unit - Turn collision for SS_Command_Unit[SS_Loop] Off
Unit - Make SS_Command_Unit[SS_Loop] Invulnerable
Unit - Make SS_BackPack[SS_Loop] Invulnerable
Custom script: if UnitAddAbility(udg_SS_Command_Unit[udg_SS_Loop],'Amrf') then
Animation - Change SS_Command_Unit[SS_Loop] flying height to 1000000000.00 at 0.00
Custom script: call UnitRemoveAbility(udg_SS_Command_Unit[udg_SS_Loop],'Amrf')
Custom script: endif
Custom script: if UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Amrf') then
Animation - Change SS_Caster[SS_Loop] flying height to 1000000000.00 at 0.00
Custom script: call UnitRemoveAbility(udg_SS_Caster[udg_SS_Loop],'Amrf')
Custom script: endif
Custom script: if UnitAddAbility(udg_SS_BackPack[udg_SS_Loop],'Amrf') then
Animation - Change SS_BackPack[SS_Loop] flying height to 1000000000.00 at 0.00
Custom script: call UnitRemoveAbility(udg_SS_Caster[udg_SS_Loop],'Amrf')
Custom script: endif
Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])
Set SS_Point[SS_Loop] = (Position of SS_Destructible[SS_Loop])
Unit - Create 1 SS_DummyUnitType for Neutral Passive at SS_Point[SS_Loop] facing (Random angle) degrees
Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)
Animation - Change (Last created unit)'s size to (SS_Config_SFX_Finnish_Size%, SS_Config_SFX_Finnish_Size%, SS_Config_SFX_Finnish_Size%) of its original size
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_FinnishModel
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Finnish_Red%, SS_Config_SFX_Finnish_Green%, SS_Config_SFX_Finnish_Blue%) with 0.00% transparency
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Regardless if the target is a Unit or a Destructible, you must create variables for both so De-indexing works properly. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_ShapeShiftUnit[SS_Loop] = No unit
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Turning on the main trigger. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in SS_ActionGroup) Equal to 1
Then - Actions
Trigger - Turn on ShapeShift Loop <gen>
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if trigger is ready to be turned off. There is no point having this trigger running if no one is animating the ShapeShift. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in SS_AnimationGroup) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Else - Actions
ShapeShift Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Using unit groups helps to isolate the unit in question. Also it separates the units that are Shape Shifting and the ones that are still in the process. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit Group - Pick every unit in SS_ActionGroup and do (Actions)
Loop - Actions
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Equal to SS_Caster[SS_Loop]
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if Shapeshifting time ran out, or ShapeShifting unit/destructible is dead. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
SS_TimeLimit[SS_Loop] Greater than 0.00
SS_Command_Unit[SS_Loop] Not equal to No unit
Or - Any (Conditions) are true
Conditions
And - All (Conditions) are true
Conditions
SS_ShapeShiftUnit[SS_Loop] Not equal to No unit
(SS_ShapeShiftUnit[SS_Loop] is alive) Equal to True
And - All (Conditions) are true
Conditions
SS_Destructible[SS_Loop] Not equal to No destructible
(SS_Destructible[SS_Loop] is alive) Equal to True
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Conditions met, which means the caster is still alive/still has time. Move caster, backpack and control unit to position of shapeshift unit/destructible. --------
-------- and reduce the time by 0.03 --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_TimeLimit[SS_Loop] = (SS_TimeLimit[SS_Loop] - 0.03)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_ShapeShiftUnit[SS_Loop] Not equal to No unit
Then - Actions
Set SS_Point[SS_Loop] = (Position of SS_ShapeShiftUnit[SS_Loop])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Destructible[SS_Loop] Not equal to No destructible
Then - Actions
Set SS_Point[SS_Loop] = (Position of SS_Destructible[SS_Loop])
Else - Actions
Unit - Move SS_Command_Unit[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_Command_Unit[SS_Loop]) degrees
Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_ShapeShiftUnit[SS_Loop]) degrees
Unit - Move SS_BackPack[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_ShapeShiftUnit[SS_Loop]) degrees
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- If the Hero is locked onto an item, he will pick it up if he is in range of it. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
SS_ItemTarget[SS_Loop] Not equal to No item
(SS_ItemTarget[SS_Loop] is owned) Equal to False
Then - Actions
Set SS_TempPoint[6] = (Position of SS_ItemTarget[SS_Loop])
Set SS_OrderCheckerItemDistance = (Distance between SS_Point[SS_Loop] and SS_TempPoint[6])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_OrderCheckerItemDistance Less than or equal to SS_Config_ItemGrabRange
Then - Actions
Hero - Give SS_ItemTarget[SS_Loop] to SS_Command_Unit[SS_Loop]
Set SS_ItemTarget[SS_Loop] = No item
Else - Actions
Custom script: call RemoveLocation (udg_SS_TempPoint[6])
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- If the item the Hero wanted to pick up gets picked up by someone else, then it is cleared as the item target. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_ItemTarget[SS_Loop] = No item
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if caster gained some experience, if he did, store it away. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hero experience of SS_Caster[SS_Loop]) Greater than 0
Then - Actions
Set SS_StoredEXP[SS_Loop] = ((Hero experience of SS_Caster[SS_Loop]) + SS_StoredEXP[SS_Loop])
Hero - Add ((Hero experience of SS_Caster[SS_Loop]) x -1) experience to SS_Caster[SS_Loop], Hide level-up graphics
Else - Actions
Custom script: call RemoveLocation (udg_SS_Point[udg_SS_Loop])
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- If times up or ShapeShift unit/destructible is dead, then end the spell. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Destructible[SS_Loop] Not equal to No destructible
Then - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Properly aligning caster's position and removing the ShapeShift unit/destructible. You must kill the destructible before removing it, otherwise it will crash the game (Blizzard Bug). --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Set SS_TempPoint[3] = (Position of SS_Destructible[SS_Loop])
Destructible - Kill SS_Destructible[SS_Loop]
Destructible - Remove SS_Destructible[SS_Loop]
Unit - Move SS_Caster[SS_Loop] instantly to SS_TempPoint[3], facing (Facing of SS_Caster[SS_Loop]) degrees
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Properly aligning caster's position and removing the ShapeShift unit/destructible. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_ShapeShiftUnit[SS_Loop] Not equal to No unit
Then - Actions
Set SS_TempPoint[3] = (Position of SS_ShapeShiftUnit[SS_Loop])
Unit - Remove SS_ShapeShiftUnit[SS_Loop] from the game
Unit - Move SS_Caster[SS_Loop] instantly to SS_TempPoint[3], facing (Facing of SS_Caster[SS_Loop]) degrees
Else - Actions
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Returning the hero back to normal. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Unit - Hide SS_Caster[SS_Loop]
Custom script: call UnitRemoveAbility (udg_SS_Caster[udg_SS_Loop],'Aloc')
Unit - Unhide SS_Caster[SS_Loop]
Custom script: if UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Amrf') then
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(SS_ShapeShiftUnit[SS_Loop] is A flying unit) Equal to True
(Default flying height of SS_ShapeShiftUnit[SS_Loop]) Greater than 0.00
Then - Actions
Animation - Change SS_Caster[SS_Loop] flying height to (Default flying height of SS_ShapeShiftUnit[SS_Loop]) at 0.00
Animation - Change SS_Caster[SS_Loop] flying height to (Default flying height of SS_Caster[SS_Loop]) at 500.00
Else - Actions
Animation - Change SS_Caster[SS_Loop] flying height to (Default flying height of SS_ShapeShiftUnit[SS_Loop]) at 0.00
Animation - Change SS_Caster[SS_Loop] flying height to (Default flying height of SS_Caster[SS_Loop]) at 500.00
Custom script: call UnitRemoveAbility(udg_SS_Caster[udg_SS_Loop],'Amrf')
Custom script: endif
Selection - Select SS_Caster[SS_Loop] for (Owner of SS_Caster[SS_Loop])
Unit Group - Remove SS_Caster[SS_Loop] from SS_ActionGroup
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Giving stored experience. --------
Hero - Add SS_StoredEXP[SS_Loop] experience to SS_Caster[SS_Loop], Show level-up graphics
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Passing all items over to the hero. The the Hero has a full inventory, then items fall at the hero's feet. --------
-------- Hiding and showing prevents a blizzard bug. The bug premenantly gives the Hero the item ability. This bug rarely happens though. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_ItemLoop = 1
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Item - Hide (Item carried by SS_BackPack[SS_Loop] in slot SS_ItemLoop)
Hero - Drop the item from slot SS_ItemLoop of SS_BackPack[SS_Loop]
Item - Show (Last dropped item)
Hero - Give (Last dropped item) to SS_Caster[SS_Loop]
Set SS_ItemLoop = (SS_ItemLoop + 1)
Set SS_ItemLoop = 1
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Item - Hide (Item carried by SS_Command_Unit[SS_Loop] in slot SS_ItemLoop)
Hero - Drop the item from slot SS_ItemLoop of SS_Command_Unit[SS_Loop]
Item - Show (Last dropped item)
Hero - Give (Last dropped item) to SS_Caster[SS_Loop]
Set SS_ItemLoop = (SS_ItemLoop + 1)
Unit - Remove SS_BackPack[SS_Loop] from the game
Unit - Remove SS_Command_Unit[SS_Loop] from the game
-------- Checking if enemies are nearby for a suprise attack. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_TempDamageGroup = (Units within SS_Config_Levels_AoE[SS_AbilityLevel[SS_Loop]] of SS_TempPoint[3] matching ((((((Matching unit) belongs to an enemy of (Owner of SS_Caster[SS_Loop])) Equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and (((Matching unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Config_NO_DamageOnDeath Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_TempDamageGroup is empty) Not equal to True
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If there are enemies nearby, the caster bursts out with a green explosion, the special effects I used are listed below. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Ancient Explosion SFX by WILL THE ALMIGHTY --------
-------- [url]http://www.hiveworkshop.com/forums/models-530/ancient-explosion-sfx-104179/#post878174[/url] --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Earth Nova by JetFangInferno --------
-------- [url]http://www.hiveworkshop.com/forums/models-530/earth-nova-50406/#post466588[/url] --------
-------- There are many different coloured Novas by JasonFangInferno. So if you don't like the green colour, you can easily trade out the models. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Create 1 SS_DummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 4.00 second Water Elemental expiration timer to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_ExplosionModel2
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s size to (SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Explo2_Red%, SS_Config_SFX_Explo2_Green%, SS_Config_SFX_Explo2_Blue%) with 0.00% transparency
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Create 1 SS Dummy for (Owner of SS_Caster[SS_Loop]) at SS_TempPoint[3] facing Default building facing degrees
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_ExplosionModel
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s size to (SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Explo_Red%, SS_Config_SFX_Explo_Green%, SS_Config_SFX_Explo_Blue%) with 0.00% transparency
Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part conducts the damage and maim. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Add SS_Config_ABIL_DummySlow to (Last created unit)
Unit - Set level of SS_Config_ABIL_DummySlow for (Last created unit) to SS_AbilityLevel[SS_Loop]
Unit Group - Pick every unit in SS_TempDamageGroup and do (Actions)
Loop - Actions
Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
Unit - Cause SS_Caster[SS_Loop] to damage (Picked unit), dealing SS_Config_Levels_Damage[SS_AbilityLevel[SS_Loop]] damage of attack type Spells and damage type Normal
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If there are no enemies nearby, then a pufff of smoke appears instead. There is no point to explode outward at nothing. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
For each (Integer A) from 1 to SS_Config_SFX_SmokeThickness, do (Actions)
Loop - Actions
Unit - Create 1 SS_DummyUnitType for Neutral Passive at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
Animation - Change (Last created unit)'s size to (SS_Config_SFX_Smoke_Size%, SS_Config_SFX_Smoke_Size%, SS_Config_SFX_Smoke_Size%) of its original size
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_SmokeModel
Special Effect - Destroy (Last created special effect)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_TimeLimit[SS_Loop] Less than or equal to 0.00
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part is the same as above, this part works only when you set "NO_DamageOnDeath" to True, then run out of time. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Create 1 SS_DummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 4.00 second Water Elemental expiration timer to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_ExplosionModel2
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s size to (SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Explo2_Red%, SS_Config_SFX_Explo2_Green%, SS_Config_SFX_Explo2_Blue%) with 0.00% transparency
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Create 1 SS_DummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_ExplosionModel
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s size to (SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Explo_Red%, SS_Config_SFX_Explo_Green%, SS_Config_SFX_Explo_Blue%) with 0.00% transparency
Unit - Add SS_Config_ABIL_DummySlow to (Last created unit)
Unit - Set level of SS_Config_ABIL_DummySlow for (Last created unit) to SS_AbilityLevel[SS_Loop]
Unit Group - Pick every unit in SS_TempDamageGroup and do (Actions)
Loop - Actions
Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
Unit - Cause SS_Caster[SS_Loop] to damage (Picked unit), dealing SS_Config_Levels_Damage[SS_AbilityLevel[SS_Loop]] damage of attack type Spells and damage type Normal
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If there are no enemies nearby, then a pufff of smoke appears instead. There is no point to explode outward at nothing. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
For each (Integer A) from 1 to SS_Config_SFX_SmokeThickness, do (Actions)
Loop - Actions
Unit - Create 1 SS_DummyUnitType for Neutral Passive at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
Animation - Change (Last created unit)'s size to (SS_Config_SFX_Smoke_Size%, SS_Config_SFX_Smoke_Size%, SS_Config_SFX_Smoke_Size%) of its original size
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_SmokeModel
Special Effect - Destroy (Last created special effect)
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Clearing leaks and de-indexing --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Custom script: call DestroyGroup (udg_SS_TempDamageGroup)
Custom script: call RemoveLocation (udg_SS_TempPoint[3])
Set SS_ItemTarget[SS_Loop] = SS_ItemTarget[SS_Index]
Set SS_AbilityLevel[SS_Loop] = SS_AbilityLevel[SS_Index]
Set SS_BackPack[SS_Loop] = SS_BackPack[SS_Index]
Set SS_StoredEXP[SS_Loop] = SS_StoredEXP[SS_Index]
Set SS_Caster[SS_Loop] = SS_Caster[SS_Index]
Set SS_Point[SS_Loop] = SS_Point[SS_Index]
Set SS_Command_Unit[SS_Loop] = SS_Command_Unit[SS_Index]
Set SS_TargetHp[SS_Loop] = SS_TargetHp[SS_Index]
Set SS_DelayDuration[SS_Loop] = SS_DelayDuration[SS_Index]
Set SS_TimeLimit[SS_Loop] = SS_TimeLimit[SS_Index]
Set SS_SpecialEffectGroup[SS_Loop] = SS_SpecialEffectGroup[SS_Index]
Set SS_ShapeShiftUnit[SS_Loop] = SS_ShapeShiftUnit[SS_Index]
Set SS_OriginalOwner[SS_Loop] = SS_OriginalOwner[SS_Index]
Set SS_TargetMana[SS_Loop] = SS_TargetMana[SS_Index]
Set SS_UnitType[SS_Loop] = SS_UnitType[SS_Index]
Set SS_Destructible[SS_Loop] = SS_Destructible[SS_Index]
Set SS_DestructibleType[SS_Loop] = SS_DestructibleType[SS_Index]
Set SS_Index = (SS_Index - 1)
Set SS_Loop = (SS_Loop - 1)
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Checking if trigger is ready to be turned off. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Index Equal to 0
Then - Actions
Trigger - Turn off ShapeShift Loop <gen>
Else - Actions
Else - Actions
ShapeShift Command
Events
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order targeting an object
Conditions
Or - Any (Conditions) are true
Conditions
(Issued order) Equal to (Order(move))
(Issued order) Equal to (Order(smart))
Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part controls the ShapeShiftUnit. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to True
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to False
(Ordered unit) Equal to SS_Command_Unit[SS_Loop]
SS_Destructible[SS_Loop] Equal to No destructible
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This various condtions check what you are rightclicking. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_ItemTarget[SS_Loop] = (Target item of issued order)
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This checks if you clicked an item. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_ItemTarget[SS_Loop] Not equal to No item
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If you did, then it will see if it in range to be picked up, if it isn't then the ShapShiftUnit will move towards the item. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_TempPoint[2] = (Position of SS_ItemTarget[SS_Loop])
Set SS_TempPoint[5] = (Position of SS_Command_Unit[SS_Loop])
Set SS_OrderCheckerItemDistance = (Distance between SS_TempPoint[2] and SS_TempPoint[5])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_OrderCheckerItemDistance Less than or equal to SS_Config_ItemGrabRange
Then - Actions
Hero - Give SS_ItemTarget[SS_Loop] to SS_Command_Unit[SS_Loop]
Set SS_ItemTarget[SS_Loop] = No item
Else - Actions
Unit - Order SS_ShapeShiftUnit[SS_Loop] to Move To SS_TempPoint[2]
Custom script: call RemoveLocation (udg_SS_TempPoint[5])
Custom script: call RemoveLocation (udg_SS_TempPoint[2])
Else - Actions
Set SS_ItemTarget[SS_Loop] = No item
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part is only for Neutral Units, If they are asleep, they cannot be moved, so we must wake them up. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Notice that there is a trigger that moves them to there original position. This is to reset the gaurd position. Without it, the unit cannot stand still and will return to wherever it was spawned. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of SS_ShapeShiftUnit[SS_Loop]) Equal to Neutral Hostile
(Owner of SS_ShapeShiftUnit[SS_Loop]) Equal to Neutral Victim
(Owner of SS_ShapeShiftUnit[SS_Loop]) Equal to Neutral Extra
(Owner of SS_ShapeShiftUnit[SS_Loop]) Equal to Neutral Passive
Or - Any (Conditions) are true
Conditions
(SS_ShapeShiftUnit[SS_Loop] sleeps when unprovoked at night) Equal to True
(SS_ShapeShiftUnit[SS_Loop] sleeps when unprovoked) Equal to True
Then - Actions
Set SS_TempPoint[2] = (Position of SS_ShapeShiftUnit[SS_Loop])
Unit - Move SS_ShapeShiftUnit[SS_Loop] instantly to SS_TempPoint[2]
Unit - Wake up SS_ShapeShiftUnit[SS_Loop]
Custom script: call RemoveLocation (udg_SS_TempPoint[2])
Else - Actions
Set SS_OrderCheckerUnit = (Target unit of issued order)
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- These triggers check you clicked a unit, destructible or the ground. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_OrderCheckerUnit Not equal to No unit
Then - Actions
Unit - Order SS_ShapeShiftUnit[SS_Loop] to Right-Click SS_OrderCheckerUnit
Set SS_OrderCheckerUnit = No unit
Else - Actions
Set SS_OrderCheckerDestructable = (Target destructible of issued order)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_OrderCheckerDestructable Not equal to No destructible
Then - Actions
Unit - Order SS_ShapeShiftUnit[SS_Loop] to Right-Click SS_OrderCheckerDestructable
Set SS_OrderCheckerDestructable = No destructible
Else - Actions
Set SS_TempPoint[2] = (Target point of issued order)
Unit - Order SS_ShapeShiftUnit[SS_Loop] to Move To SS_TempPoint[2]
Custom script: call RemoveLocation (udg_SS_TempPoint[2])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to True
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to False
(Ordered unit) Equal to SS_Command_Unit[SS_Loop]
SS_Destructible[SS_Loop] Not equal to No destructible
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_ItemTarget[SS_Loop] = (Target item of issued order)
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This checks if you clicked an item as a destructible. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_ItemTarget[SS_Loop] Not equal to No item
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If you did, then it will see if it in range to be picked up, if it isn't then nothing happens. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_TempPoint[2] = (Position of SS_ItemTarget[SS_Loop])
Set SS_TempPoint[5] = (Position of SS_Command_Unit[SS_Loop])
Set SS_OrderCheckerItemDistance = (Distance between SS_TempPoint[2] and SS_TempPoint[5])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_OrderCheckerItemDistance Less than or equal to SS_Config_ItemGrabRange
Then - Actions
Hero - Give SS_ItemTarget[SS_Loop] to SS_Command_Unit[SS_Loop]
Set SS_ItemTarget[SS_Loop] = No item
Else - Actions
Set SS_ItemTarget[SS_Loop] = No item
Custom script: call RemoveLocation (udg_SS_TempPoint[2])
Custom script: call RemoveLocation (udg_SS_TempPoint[5])
Else - Actions
Else - Actions
ShapeShift Deselection
Events
Player - Player 1 (Red) Deselects a unit
Player - Player 2 (Blue) Deselects a unit
Player - Player 3 (Teal) Deselects a unit
Player - Player 4 (Purple) Deselects a unit
Player - Player 5 (Yellow) Deselects a unit
Player - Player 6 (Orange) Deselects a unit
Player - Player 7 (Green) Deselects a unit
Player - Player 8 (Pink) Deselects a unit
Player - Player 9 (Gray) Deselects a unit
Player - Player 10 (Light Blue) Deselects a unit
Player - Player 11 (Dark Green) Deselects a unit
Player - Player 12 (Brown) Deselects a unit
Conditions
Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- These conditions check if you lose selection of your Controller. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to True
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to False
(Owner of (Triggering unit)) Equal to (Owner of SS_Caster[SS_Loop])
SS_Command_Unit[SS_Loop] Equal to (Triggering unit)
SS_Destructible[SS_Loop] Equal to No destructible
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This action is empty because, unlike ShapeShifting as a desructible, if you lose selection of the Controller, you can simply click on the ShapeShift unit and it will give you selection to the corresponding Controller. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to False
(Owner of (Triggering unit)) Equal to (Owner of SS_Caster[SS_Loop])
SS_Command_Unit[SS_Loop] Equal to (Triggering unit)
SS_Destructible[SS_Loop] Not equal to No destructible
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If the unit is a destructible, It will force you to select the Controller because there is noway to get selection of the controller once you lose it ShapeShifting as a destructible. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Trigger - Turn off ShapeShift Selection <gen>
Selection - Add (Triggering unit) to selection for (Owner of SS_Caster[SS_Loop])
Trigger - Turn on ShapeShift Selection <gen>
Else - Actions
ShapeShift Selection
Events
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
Player - Player 3 (Teal) Selects a unit
Player - Player 4 (Purple) Selects a unit
Player - Player 5 (Yellow) Selects a unit
Player - Player 6 (Orange) Selects a unit
Player - Player 7 (Green) Selects a unit
Player - Player 8 (Pink) Selects a unit
Player - Player 9 (Gray) Selects a unit
Player - Player 10 (Light Blue) Selects a unit
Player - Player 11 (Dark Green) Selects a unit
Player - Player 12 (Brown) Selects a unit
Conditions
Actions
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to True
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to False
SS_ShapeShiftUnit[SS_Loop] Equal to (Triggering unit)
SS_Destructible[SS_Loop] Equal to No destructible
Then - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If you click on you ShapeShiftUnit, you will get selection of the correct Controller. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of SS_ShapeShiftUnit[SS_Loop]) Not equal to (Owner of SS_Caster[SS_Loop])
((Triggering unit) is in SS_SelectionGroup) Equal to False
Then - Actions
Trigger - Turn off ShapeShift Deselection <gen>
Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])
Trigger - Turn on ShapeShift Deselection <gen>
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part applies to those who have used the BackStab ability. Clciking on the ShapeShift unit again return selection to the control unit, once again, allowing the use of "Stop Shape Shift" --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in SS_SelectionGroup) Equal to False
Then - Actions
Unit Group - Add (Triggering unit) to SS_SelectionGroup
Else - Actions
Trigger - Turn off ShapeShift Deselection <gen>
Unit Group - Remove (Triggering unit) from SS_SelectionGroup
Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])
Trigger - Turn on ShapeShift Deselection <gen>
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- If you click on somthing else, when you are ShapeShifting as a destructible, then you will get selection of the Controller. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to False
(Owner of (Triggering unit)) Not equal to (Owner of SS_Caster[SS_Loop])
SS_Command_Unit[SS_Loop] Not equal to (Triggering unit)
SS_Destructible[SS_Loop] Not equal to No destructible
Then - Actions
Selection - Add SS_Command_Unit[SS_Loop] to selection for (Owner of SS_Caster[SS_Loop])
Else - Actions
ShapeShift Secondary Spells
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
(Ability being cast) Equal to SS_Config_ABIL_StopShift
(Ability being cast) Equal to SS_Config_ABIL_DropItem
(Ability being cast) Equal to SS_Config_ABIL_BackStab
Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- STOP SHAPE SHIFT ABILITY --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This spell reverts the caster back to normal and damages nearby enemies. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to SS_Config_ABIL_StopShift
Then - Actions
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Properly aligning caster's position and removing the ShapeShift unit/destructible. You must kill the destructible before removing it, otherwise it will crash the game (Blizzard Bug). --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Caster[SS_Loop] is in SS_ActionGroup) Equal to True
(Casting unit) Equal to SS_Command_Unit[SS_Loop]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Destructible[SS_Loop] Not equal to No destructible
Then - Actions
Set SS_TempPoint[3] = (Position of SS_Destructible[SS_Loop])
Destructible - Kill SS_Destructible[SS_Loop]
Destructible - Remove SS_Destructible[SS_Loop]
Unit - Move SS_Caster[SS_Loop] instantly to SS_TempPoint[3], facing (Facing of SS_Caster[SS_Loop]) degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_ShapeShiftUnit[SS_Loop] Not equal to No unit
Then - Actions
Set SS_TempPoint[3] = (Position of SS_ShapeShiftUnit[SS_Loop])
Unit - Remove SS_ShapeShiftUnit[SS_Loop] from the game
Unit - Move SS_Caster[SS_Loop] instantly to SS_TempPoint[3], facing (Facing of SS_Caster[SS_Loop]) degrees
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Returning the hero back to normal. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Hide SS_Caster[SS_Loop]
Custom script: call UnitRemoveAbility (udg_SS_Caster[udg_SS_Loop],'Aloc')
Unit - Unhide SS_Caster[SS_Loop]
Custom script: if UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Amrf') then
Animation - Change SS_Caster[SS_Loop] flying height to (Default flying height of SS_ShapeShiftUnit[SS_Loop]) at 0.00
Animation - Change SS_Caster[SS_Loop] flying height to (Default flying height of SS_Caster[SS_Loop]) at 500.00
Custom script: call UnitRemoveAbility(udg_SS_Caster[udg_SS_Loop],'Amrf')
Custom script: endif
Selection - Select SS_Caster[SS_Loop] for (Owner of SS_Caster[SS_Loop])
Hero - Add SS_StoredEXP[SS_Loop] experience to SS_Caster[SS_Loop], Show level-up graphics
Unit Group - Remove SS_Caster[SS_Loop] from SS_ActionGroup
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Giving stored experience. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Passing all items over to the hero. The the Hero has a full inventory, then items fall at the hero's feet. --------
-------- Hiding and showing prevents a blizzard bug. The bug premenantly gives the Hero the item ability. This bug rarely happens though. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_ItemLoop = 1
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Item - Hide (Item carried by SS_BackPack[SS_Loop] in slot SS_ItemLoop)
Hero - Drop the item from slot SS_ItemLoop of SS_BackPack[SS_Loop]
Item - Show (Last dropped item)
Hero - Give (Last dropped item) to SS_Caster[SS_Loop]
Set SS_ItemLoop = (SS_ItemLoop + 1)
Set SS_ItemLoop = 1
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Item - Hide (Item carried by SS_Command_Unit[SS_Loop] in slot SS_ItemLoop)
Hero - Drop the item from slot SS_ItemLoop of SS_Command_Unit[SS_Loop]
Item - Show (Last dropped item)
Hero - Give (Last dropped item) to SS_Caster[SS_Loop]
Set SS_ItemLoop = (SS_ItemLoop + 1)
Unit - Remove SS_BackPack[SS_Loop] from the game
Unit - Remove SS_Command_Unit[SS_Loop] from the game
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- Checking if enemies are nearby for a suprise attack. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part is exactly the same as the ShapeShift Loop. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Set SS_TempDamageGroup = (Units within SS_Config_Levels_AoE[SS_AbilityLevel[SS_Loop]] of SS_TempPoint[3] matching ((((((Matching unit) belongs to an enemy of (Owner of SS_Caster[SS_Loop])) Equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and (((Matching unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_TempDamageGroup is empty) Not equal to True
Then - Actions
Unit - Create 1 SS_DummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 4.00 second Water Elemental expiration timer to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_ExplosionModel2
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s size to (SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize2[SS_AbilityLevel[SS_Loop]]%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Explo2_Red%, SS_Config_SFX_Explo2_Green%, SS_Config_SFX_Explo2_Blue%) with 0.00% transparency
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Create 1 SS_DummyUnitType for (Owner of SS_Caster[SS_Loop]) at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_ExplosionModel
Special Effect - Destroy (Last created special effect)
Animation - Change (Last created unit)'s size to (SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%, SS_Config_Levels_ExplodeSize[SS_AbilityLevel[SS_Loop]]%) of its original size
Animation - Change (Last created unit)'s vertex coloring to (SS_Config_SFX_Explo_Red%, SS_Config_SFX_Explo_Green%, SS_Config_SFX_Explo_Blue%) with 0.00% transparency
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This part conducts the damage and maim. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Add SS_Config_ABIL_DummySlow to (Last created unit)
Unit - Set level of SS_Config_ABIL_DummySlow for (Last created unit) to SS_AbilityLevel[SS_Loop]
Unit Group - Pick every unit in SS_TempDamageGroup and do (Actions)
Loop - Actions
Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
Unit - Cause SS_Caster[SS_Loop] to damage (Picked unit), dealing SS_Config_Levels_Damage[SS_AbilityLevel[SS_Loop]] damage of attack type Spells and damage type Normal
Else - Actions
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Unit - Create 1 SS_DummyUnitType for Neutral Passive at SS_TempPoint[3] facing Default building facing degrees
Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
Animation - Change (Last created unit)'s size to (300.00%, 300.00%, 300.00%) of its original size
Special Effect - Create a special effect attached to the origin of (Last created unit) using SS_Config_SFX_SmokeModel
Special Effect - Destroy (Last created special effect)
-------- Clearing leaks and de-indexing --------
Custom script: call RemoveLocation (udg_SS_Point[udg_SS_Loop])
Custom script: call DestroyGroup (udg_SS_TempDamageGroup)
Custom script: call RemoveLocation (udg_SS_TempPoint[3])
Set SS_ItemTarget[SS_Loop] = SS_ItemTarget[SS_Index]
Set SS_AbilityLevel[SS_Loop] = SS_AbilityLevel[SS_Index]
Set SS_BackPack[SS_Loop] = SS_BackPack[SS_Index]
Set SS_TimeLimit[SS_Loop] = SS_TimeLimit[SS_Index]
Set SS_StoredEXP[SS_Loop] = SS_StoredEXP[SS_Index]
Set SS_Caster[SS_Loop] = SS_Caster[SS_Index]
Set SS_Point[SS_Loop] = SS_Point[SS_Index]
Set SS_Command_Unit[SS_Loop] = SS_Command_Unit[SS_Index]
Set SS_TargetHp[SS_Loop] = SS_TargetHp[SS_Index]
Set SS_DelayDuration[SS_Loop] = SS_DelayDuration[SS_Index]
Set SS_SpecialEffectGroup[SS_Loop] = SS_SpecialEffectGroup[SS_Index]
Set SS_ShapeShiftUnit[SS_Loop] = SS_ShapeShiftUnit[SS_Index]
Set SS_OriginalOwner[SS_Loop] = SS_OriginalOwner[SS_Index]
Set SS_TargetMana[SS_Loop] = SS_TargetMana[SS_Index]
Set SS_UnitType[SS_Loop] = SS_UnitType[SS_Index]
Set SS_Destructible[SS_Loop] = SS_Destructible[SS_Index]
Set SS_DestructibleType[SS_Loop] = SS_DestructibleType[SS_Index]
Set SS_Index = (SS_Index - 1)
Set SS_Loop = (SS_Loop - 1)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
-------- Checking if trigger is ready to be turned off. --------
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Index Equal to 0
Then - Actions
Trigger - Turn off ShapeShift Loop <gen>
Else - Actions
Else - Actions
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- BACK STAB ABILITY --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This spell allows team transfer. It removes the ability once used. Feel free to add a special effect. --------
-------- You can easily modify this to allow BackStab to be used more than once, enabling you to switch back and forth from teams if you like. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to SS_Config_ABIL_BackStab
Then - Actions
For each (Integer SS_Loop) from 1 to SS_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Casting unit) Equal to SS_Command_Unit[SS_Loop]
Then - Actions
Unit - Change ownership of SS_ShapeShiftUnit[SS_Loop] to (Owner of SS_Caster[SS_Loop]) and Change color
Unit - Remove SS_Config_ABIL_BackStab from (Casting unit)
Selection - Select SS_ShapeShiftUnit[SS_Loop] for (Owner of SS_Caster[SS_Loop])
Else - Actions
Else - Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- DROP ITEM ABILITY --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- There is no way to drop an item, when your position is changing every 0.03 seconds, so this ability is needed to enable the dropping of items. --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to SS_Config_ABIL_DropItem
Then - Actions
Hero - Drop (Target item of ability being cast) from (Casting unit)
Else - Actions
Shape Shift Deny Xp and Gold
Events
Conditions
Actions
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
-------- This removes the ShapeShiftUnit from the game when it dies with riencarnation, denying any gold, xp and player score at the end. --------
-------- I suggest replacing this with Bribe's Unit Event System --------
-------- [url]http://www.hiveworkshop.com/forums/spells-569/unit-event-v2-0-0-1-a-201641/?prev=d%3Dlist%26r%3D20%26u%3Dbribe[/url] --------
-------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
Unit - Change ownership of (Triggering unit) to Neutral Passive and Retain color
Unit - Remove (Triggering unit) from the game
Trigger - Remove (This trigger) from the trigger queue
Info, Pros & ConsInfo
-77 variables, 36 configurable.
-8 Abilities including the main spell.
-1 Buff
-3 Dummy units.
-Requires Vexorian's dummy.mdx
-3 Imported models.
-100% GUI
Pros
-Plenty of trigger comments.
-Noob friendly.
-Easy to modify
-Completely hides the caster from detection.
-Simple special effects.
-Simple and effective.
-Very versatile for any situation.
-Disables other spells being cast to prevent Metamorphosis issues.
-Retains colour tint and unit size modifications.
-Transitions flying height when morphing
-Includes helpful links
-Tries to use minimal imported models/icons.
-Extremely fun!
Cons
-Must remove/modify shadow for complete deception.
-ShapeShifting into a Unit that has a transform ability (like bear form) may cause issues. But is highly unlikely
-Awkward controlling two ShapeShifters at the same time.
Uses, Tips & Tricks+You can enter enemy territory, undetected.
+Blend into the enemies' army and turn the tide of battle.
+Steal Items.
+Make your opponent attack his own men or the innocent, in a desperate search for you.
+Be a Trojan Horse and let the enemy lead you to his base.
+Hide in plain sight to ambush enemies.
+Be the perfect scout.
+Clone any unit to make use of the beneficial Abilities, Spells and Auras.
+Become something stronger or faster than you to use to your advantage.
+Transform into a flying unit and escape to the skies.
+Transform into a Ship or a Naga unit and travel the waters.
+Lead your enemy into a hoard of Neutral Hostiles, then join the Neutral Hostiles.
+Turn into an enemy worker and build structures never available to you before.
This spell can be used in AoS maps, Competitive RPGs and maybe even Hero Arenas.
This spell can be used multiple times by one player, but it's recommended to have one ShapeShift per player, because controlling two ShapeShifters can be awkward.
Credits to Modellers
WIP Links
Images & GIFs
Images
GIFS
Learn Tool Tip
Level 1 Tool Tip
Back Stab Tool Tip
Stop Shape Shift Tool Tip
Initial Cast
Initial Cast Finnish
Revert Alone
Revert Near Enemy
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Morph Into Neutral
Morph Into Enemy
Revert Near Enemy
Morphing Into Rock
Morph Into Tree
Stealing Items
Borrowing Ability
![]()
![]()
![]()
![]()
![]()
![]()
![]()
No time restriction, other than the end of competition(The end of september)
LUA is in vJass yes, but you still feed it into ObjectMerger, which is 3rd party software afterall. However, it is part of JNGP, so this is really questionableConvenience over effort won't be an excuse to make use of third party programs (exception: Jass New Gen Pack). GUI actions that do not exist in the vanilla editor's database may lead to disqualification. WEU (World Editor Unlimited) and UMSWE fall into this category.
Tooltip
Icon![]()
Elemental Bodies
Summons Elemental Bodies. Brewmaster's soul is initially within one of the Elemental Body allowing that Body to cast spells. Brewmaster can transfer his soul from one Body to another. When a Body with Brewmaster's soul dies, all of the Elemental Bodies will die. When a Body without Brewmaster's soul takes damage, it will keep track of the damage source and total damage taken from that source. When a soul-less Body dies, it will return all damage it tracked, extra damage factor is returned to the killer.
Level 1 - Two Elemental Bodies, Damage Factor = 0.5, Killer Damage Factor = 1.0
Level 2 - Three Elemental Bodies, Damage Factor = 0.75, Killer Damage Factor = 1.5
Level 3 - Four Elemental Bodies, Damage Factor = 1.0, Killer Damage Factor = 2.0
Code
JASS:library ElementalBodies /* ---------------------------------------------------------- ------------- Elemental Bodies by Flux --------------- ---------------------------------------------------------- Description: Summons Elemental Bodies. Brewmaster's soul is initially within one of the Elemental Body allowing that Body to cast spells. Brewmaster can transfer his soul from one Body to another. When a Body with Brewmaster's soul dies, all of the Elemental Bodies will die. When a Body without Brewmaster's soul takes damage, it will keep track of the damage source and total damage taken from that source and when that Body dies, it will return all damage it tracked, extra damage factor is returned to the killer. Deceive your enemies thinking a certain Elemental Body has Panda's soul when it really isn't and watch him takes back his own damage. With this ability, enemies will hesitate in attacking you because they know it may backfire to them. Coding Notes: - Written in vJass making it requires Jass New Gen Pack. - Comes with some API: (that are compiled no matter what configuration is set) * function SetMaxProperty takes unit u, real newMaxProperty, unitstate maxState returns nothing Sets Max Life or Max Mana of unit u to newMaxProperty, will only work if newMaxProperty > current Max State that is why Elemental Bodies initially have 1 HP * function ExchangeItems takes unit u1, unit u2 returns nothing Exchange the Items of u1 and u2 * function CopyItemCharges takes unit ref, unit new returns nothing Change number of charges in unit new's inventory based on unit ref's inventory * function ElementalBodyHasSoul takes unit u returns integer Returns 0 if unit is not even an elemental body Returns 1 if unit is an elemental body but does not have caster's soul Returns 2 if unit is an elemental body and has caster's soul Useful if AI triggering - Comes with its own Preload. Known Issues: - Color Tint is removed on Soul-less Bodies when Frost Slowed. - Elemental Bodies must not be targetable by any Doom based ability except 'Real Silence' because if it does, the unit with the Doom ability can easily find out which Body has Panda's Soul because the "This unit has already been stricken with Doom." error will appear when trying to Doom Soul-less bodies. In this map Demo, Elemental Bodies are given Resistant Skin to make them immune to Doom. - Sometimes changes Buff Status order with Command Aura Buff allowing enemy's to identify where the soul is by looking at the order of the Buff Status. */uses /* ---------------------- Required systems ---------------------- */Table /* by Bribe [url]http://www.hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/[/url] */Alloc /* by Sevion [url]http://www.hiveworkshop.com/forums/jass-resources-412/snippet-alloc-192348/[/url] -------------------------------------------------------------- ---------------------- Must used only one ------------------- */optional TimerUtils /* by Vexorian [url]http://www.wc3c.net/showthread.php?t=107833[/url] */optional TimerUtilsEx /* by Magtheridon 96 [url]http://www.hiveworkshop.com/forums/graveyard-418/system-timerutilsex-204500/[/url] -------------------------------------------------------------- ----------------------- Optional ----------------------------- */optional SpellEffectEvent /* by Bribe [url]http://www.hiveworkshop.com/forums/jass-resources-412/snippet-spelleffectevent-187193/[/url] */optional MissileRecycler /* by Bribe [url]http://www.hiveworkshop.com/forums/jass-resources-412/system-missilerecycler-206086/[/url] -------------------------------------------------------------- */ native UnitAlive takes unit u returns boolean globals //----------------------------------------------------------------- //-----------------SPELL MECHANICS CONFIGURABLES------------------- //----------------------------------------------------------------- //Ability Rawcodes private constant integer ELEMENTAL_BODIES = 'Aelb' //The actual spell private constant integer SOUL_TRANSFER = 'Astr' //The spell that allows Panda to transfer his soul private constant integer SOUL_TRANSFER_COOLDOWN = 'Astf' //Dummy spell based on Spell Shield to simulate cooldown private constant integer SOUL_TRANSFER_TRIGGER = 'Astt' //The spell used to trigger the cooldown of the fake soul //transfer private constant integer REAL_SILENCE = 'Asil' //The spell that silences soul-less bodies private constant integer FAKE_SILENCE = 'Afsl' //To avoid identifying where the soul is, a fake //silence ability with //the same buff description is placed on the body //with Panda's soul private constant integer MAX_LIFE_MODIFIER = 'Amhp' //The Item Life Bonus ability-based to configure //bodies' max life private constant integer MAX_MANA_MODIFIER = 'Ammn' //The Item Mana Bonus ability-based to configure //bodies' max mana private constant integer INVENTORY_ABILITY = 'Aieb' //Custom Inventory (Hero) ability for Bodies that //will not allow them to drop and pick items //Buff Rawcodes private constant integer REAL_SILENCE_BUFF = 'Bsil' //Buff of Real Silence private constant integer FAKE_SILENCE_BUFF = 'Bfsl' //Buff of Fake Silence //Unit Rawcodes private constant integer DUMMY_ID = 'Dumi' //Dummy Caster's Unit-Type Id private constant integer MISSILE_ID = 'dumi' //Missile's Unit-Type Id private constant integer MAX_NUM_SPELLS = 4 //The maximum number of spells each body can have //Used to preserve array index //Configurable Properties of each bodies, look at function InitializeElementalBodies to configure them private integer array bodyId private integer array bodySpells private string array bodyOnHitSfx private string array bodyMissileSfx //Initial Body Properties private constant boolean RANDOM_INITIAL_BODY = true private integer initialBody = 1 //For determining where the caster will be initially //Will only work if RANDOM_INITIAL_BODY = false, //Value is the index of the bodyId array //Make sure that initialBody is available in all levels //------------------- LIFE AND MANA OF ELEMENTAL BODIES ----------------------- //Determines whether summoned elemental bodies will have the max life/mana of the caster //If set to false, then Life/Mana will be constant per level (look at function StaticHp and StaticMana) private constant boolean INHERIT_MAX_LIFE = true private constant boolean INHERIT_MAX_MANA = true //Each Elemental Body will have different Life/Mana Bonus depending on the Element type and level //Look at function ExtraHp and ExtraMana and configure the bonus of each element //Can be set to negative value private constant boolean INCLUDE_LIFE_BONUS = false private constant boolean INCLUDE_MANA_BONUS = false //Elemental Bodies summoned will have a life/mana equal to the caster's current life/mana //If set to false, Elemental Bodies will initially have full life/mana when summoned private constant boolean USE_CURRENT_LIFE = true private constant boolean USE_CURRENT_MANA = true //---------------- DETERMINES IF ELEMENTAL BODIES WILL HAVE THE CASTER'S ITEMS -------------------- private constant boolean INHERIT_ITEMS = true //Missile Properties private constant real TIMEOUT = 0.031250000 //Generic Timeout for timers (missile and silencing) private constant real MISSILE_HIT_DISTANCE = 30 //If distance of missile to target <= MISSILE_HIT_DISTANCE, //then missile will hit private constant real MAX_MISSILE_SCALE = 2.00 //Missile size will vary depending on the damage private constant real MIN_MISSILE_SCALE = 0.60 //Missile size will vary depending on the damage private constant real MISSILE_HEIGHT = 50 //Initial Height of the missiles private constant boolean MISSILE_HAS_VISION = true //if true, sight radius of Missile Dummy is used //Set whether an Elemental Body expiring (because of time duration) will return all damage taken //If set to false, an Elemental Body will only return damage when it is killed through damage private constant boolean DAMAGE_ON_EXPIRE = false //Attack and Damage Type when the missile hits private constant attacktype ATTACK_TYPE = ATTACK_TYPE_NORMAL private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_MAGIC //Dummy Item Id, any item that takes space and you did not use in your map private constant integer DUMMY_ITEM_ID = 'ches' endglobals private function InitializeElementalBodies takes nothing returns nothing //NOTE: The Order matters, as set in the Object Editor.. //The Order depends on the availability at each level, Example: //at Level 1, you can only create bodyId[1] and bodyId[2] //at Level 2, you can create bodyId[1], bodyId[2] and bodyId[3] //at Level 3, you can create bodyId[1], bodyId[2], bodyId[3] and bodyId[4] //Fire set bodyId[1] = 'fire' set bodyOnHitSfx[1] = "Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl" set bodyMissileSfx[1] = "Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl" set bodySpells[MAX_NUM_SPELLS*1 + 1] = 'A000' set bodySpells[MAX_NUM_SPELLS*1 + 2] = 'A001' set bodySpells[MAX_NUM_SPELLS*1 + 3] = 'A002' set bodySpells[MAX_NUM_SPELLS*1 + 4] = 'A003' //Storm set bodyId[2] = 'strm' set bodyOnHitSfx[2] = "Abilities\\Spells\\Items\\AIlb\\AIlbSpecialArt.mdl" set bodyMissileSfx[2] = "Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl" set bodySpells[MAX_NUM_SPELLS*2 + 1] = 'A004' set bodySpells[MAX_NUM_SPELLS*2 + 2] = 'A005' set bodySpells[MAX_NUM_SPELLS*2 + 3] = 'A006' set bodySpells[MAX_NUM_SPELLS*2 + 4] = 'A007' //Earth set bodyId[3] = 'eart' set bodyOnHitSfx[3] = "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" set bodyMissileSfx[3] = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" set bodySpells[MAX_NUM_SPELLS*3 + 1] = 'A008' set bodySpells[MAX_NUM_SPELLS*3 + 2] = 'A009' set bodySpells[MAX_NUM_SPELLS*3 + 3] = 'A00A' set bodySpells[MAX_NUM_SPELLS*3 + 4] = 'A00B' //Wind set bodyId[4] = 'wind' set bodyOnHitSfx[4] = "Abilities\\Spells\\Human\\SpellSteal\\SpellStealTarget.mdl" set bodyMissileSfx[4] = "Abilities\\Spells\\Other\\Tornado\\TornadoElementalSmall.mdl" set bodySpells[MAX_NUM_SPELLS*4 + 1] = 'A00C' set bodySpells[MAX_NUM_SPELLS*4 + 2] = 'A00D' set bodySpells[MAX_NUM_SPELLS*4 + 3] = 'A00E' set bodySpells[MAX_NUM_SPELLS*4 + 4] = 'A00F' //Add more if needed //Example: //... //set bodyId[5] = 'wter' //set bodyOnHitSfx[5] = "..." //set bodyMissileSfx[5] = "..." //... endfunction //----------------------------------------------------------------- //-----------------------SPELL CONFIGURABLES----------------------- //----------------------------------------------------------------- //Number of Elemental Bodies created per level private constant function NumberOfBodies takes integer lvl returns integer return lvl + 1 endfunction //How much scaling the damage will be returned to the non-killer source per level private constant function DamageFactor takes integer lvl returns real return 0.25*lvl + 0.5 //0.75, 1.00, 1.25 endfunction //How much scaling the damage will be returned to the killer source per level private constant function KillerDamageFactor takes integer lvl returns real return 0.5*lvl + 0.5 //1.0, 1.5, 2.0 endfunction //Soul Transfer Cooldown per level, it should match Object Editor: 'Soul Transfer (Fake)' Stats - Cooldown private constant function Cooldown takes integer lvl returns real return 4.0 - 1*lvl //3.0, 2.0, 1.0 endfunction //How fast does the Missile travel per second private constant function MissileSpeed takes integer lvl returns real return 200.0*lvl + 500.0 //700, 900, 1100 endfunction //The Unit Filter for those hit by the missiles private constant function TargetFilter takes unit filter, unit u returns boolean return IsUnitEnemy(filter, GetOwningPlayer(u)) and not(IsUnitType(filter, UNIT_TYPE_STRUCTURE)) endfunction //If INHERIT_MAX_LIFE = false, then elemental bodies will have a constant max life per level configured below static if not INHERIT_MAX_LIFE then private constant function StaticHp takes integer lvl returns real return 300.0*lvl + 800.0 endfunction endif //If INHERIT_MANA_LIFE = false, then elemental bodies will have a constant max mana per level configured below static if not INHERIT_MANA_LIFE then private constant function StaticMana takes integer lvl returns real return 150.0*lvl + 250.0 endfunction endif //Extra HP of elemental bodies, will only work if INCLUDE_LIFE_BONUS = true static if INCLUDE_LIFE_BONUS then private constant function ExtraHp takes integer lvl, unit u returns real local integer id = GetUnitTypeId(u) if id == bodyId[1] then //fire return 150.0*lvl + 50.0 elseif id == bodyId[2] then //storm return 120.0*lvl + 40.0 elseif id == bodyId[3] then //earth return 200.0*lvl + 100.0 elseif id == bodyId[4] then //wind return 100.0*lvl + 25.0 //add more if needed //elseif id == bodyId[5] then // return ... endif return 0.0 endfunction endif //Extra Mana of elemental bodies, will only work if INCLUDE_MANA_BONUS = true static if INCLUDE_MANA_BONUS then private constant function ExtraMana takes integer lvl, unit u returns real local integer id = GetUnitTypeId(u) if id == bodyId[1] then //fire return 20.0*lvl + 30.0 elseif id == bodyId[2] then //storm return 50.0*lvl + 50.0 elseif id == bodyId[3] then //earth return 15.0*lvl + 20.0 elseif id == bodyId[4] then //wind return 30.0*lvl + 25.0 //add more if needed //elseif id == bodyId[5] then // return ... endif return 0.0 endfunction endif //----------------------------------------------------------------- //--------------------- END SPELL CONFIGURABLES--------------------- //----------------------------------------------------------------- globals //----------------------------------------------------------------- //-------------------------SYSTEM VARIABLES------------------------ //----------------------------------------------------------------- private keyword Body private keyword DmgHandler private Body tempBodyHead //Keep track of the first elemental body created per spell instance private DmgHandler globalHead //Head of the Global Linked List private Table tbId //Table for Instance Id private trigger uponSummon = CreateTrigger() //trigger when an elemental body is summoned private group unsilencedBodies = CreateGroup() //contains unsilenced summoned elemental bodies. private boolean linkBody //Tells the spell when to and when not to link summoned bodies private unit dummy //The Dummy caster of this spell private player neutral = Player(14) //The owner of the Dummy Caster and Dummy Missile //it may not trigger Spell Shield if changed private timer periodic = CreateTimer() //The Missile's Periodic Timer private timer silenceTimer = CreateTimer() //The Elemental Bodies silencing Periodic Timer private real distSquared = MISSILE_HIT_DISTANCE*MISSILE_HIT_DISTANCE //To avoid using SquareRoot private integer array digitPlace //For Setting Max Life and Max Mana endglobals //Changes the Max Life or Max Mana of a unit to a new value function SetMaxProperty takes unit u, real newMaxProperty, unitstate maxState returns nothing local integer addMaxProperty local integer digit local integer index local integer i local integer abil if maxState == UNIT_STATE_MAX_LIFE or maxState == UNIT_STATE_MAX_MANA then set addMaxProperty = R2I(newMaxProperty - GetUnitState(u, maxState)) if maxState == UNIT_STATE_MAX_LIFE then set abil = MAX_LIFE_MODIFIER else set abil = MAX_MANA_MODIFIER endif set index = 5 loop exitwhen index == 1 set digit = addMaxProperty - (addMaxProperty/digitPlace[index])*digitPlace[index] //non BJ Modulo set i = (addMaxProperty - digit)/digitPlace[index] //how many times it will loop set addMaxProperty = digit //store how much hp/mana was not added to be used in the next loop loop exitwhen i == 0 call UnitAddAbility(u, abil) call SetUnitAbilityLevel(u, abil, index) call UnitRemoveAbility(u, abil) set i = i - 1 endloop set index = index - 1 endloop endif endfunction function ExchangeItems takes unit u1, unit u2 returns nothing local integer i = 0 local item it //temp Item to reduce redundant function calls local item array it1 local item array it2 //Store all the items loop exitwhen i > 5 set it1[i] = UnitItemInSlot(u1, i) call UnitRemoveItem(u1, it1[i]) set it2[i] = UnitItemInSlot(u2, i) call UnitRemoveItem(u2, it2[i]) set i = i + 1 endloop //Give the items set i = 0 loop exitwhen i > 5 //Give u2's items to u1 if UnitAlive(u1) then if it2[i] == null then call UnitAddItemById(u1, DUMMY_ITEM_ID) else call UnitAddItem(u1, it2[i]) set it2[i] = null endif else if not(it2[i] == null) then call RemoveItem(it2[i]) endif endif //Give u1's items to u2 if UnitAlive(u2) then if it1[i] == null then call UnitAddItemById(u2, DUMMY_ITEM_ID) else call UnitAddItem(u2, it1[i]) set it1[i] = null endif else if not(it1[i] == null) then call RemoveItem(it1[i]) endif endif set i = i + 1 endloop //Remove all Dummy items //Dummy Items were added so that the item slot are consistent set i = 0 loop exitwhen i > 5 set it = UnitItemInSlot(u1, i) if GetItemTypeId(it) == DUMMY_ITEM_ID then call RemoveItem(it) endif set it = UnitItemInSlot(u2, i) if GetItemTypeId(it) == DUMMY_ITEM_ID then call RemoveItem(it) endif set i = i + 1 endloop set it = null set u1 = null set u2 = null endfunction //Note that this will only update the charges of "unit ref's" item to "unit new" //It will ignore "unit ref" item types that are not found in "unit new" function CopyItemCharges takes unit ref, unit new returns nothing local integer i = 0 local integer charges local item it1 local item it2 loop exitwhen i > 5 set it1 = UnitItemInSlot(new, i) set it2 = UnitItemInSlot(ref, i) set charges = GetItemCharges(it2) if GetItemCharges(it1) != charges then //If 'unit new' has an item but 'unit ref' has not, most likely case is an item is used //If so, then remove unit new's item to match unit ref's item if it2 == null then if it1 != null then call RemoveItem(it1) endif else call SetItemCharges(it1, charges) endif endif set i = i + 1 endloop set it1 = null set it2 = null endfunction //Struct that handles the damaging and missiles struct DmgHandler extends array implement Alloc real damage //Total Damage Taken from the Source boolean sourceFlying//True if the damage source is flying private unit source //Source of the Damage private unit caster //Used as the damaging unit when the missile hits private real speed //Speed of the missile scaled based on TIMEOUT and level private effect sfx //Special Effect of the Missile private boolean head //True if the node is the head private real x //X of missile private real y //Y of missile private real z //Z of missile private real maxHp //Max HP of the missile's elemental body for missile scaling private unit missile //The missile unit readonly thistype next readonly thistype prev static method create takes real r returns thistype local thistype this = allocate() set head = true set maxHp = r set next = 0 set prev = 0 return this endmethod //insert a node next to the head method insert takes unit dmgSource returns thistype local thistype node = allocate() set node.source = dmgSource set node.maxHp = maxHp //same as the maxHp of the head //this = head of node set node.prev = this set node.next = next set node.next.prev = node set next = node return node endmethod //remove the node method remove takes nothing returns nothing if not head then set prev.next = next set next.prev = prev endif if missile != null then static if LIBRARY_MissileRecycler then call DestroyEffect(sfx) call SetUnitOwner(missile, Player(15), false) call RecycleMissile(missile) else call DestroyEffect(sfx) call KillUnit(missile) endif endif //Reset the variables set missile = null set source = null set caster = null set sfx = null set head = false set sourceFlying = false //free the instance call deallocate() endmethod //move the missile instance private method move takes nothing returns nothing local real facing local real x2 local real y2 local real distSq if UnitAlive(source) then set x2 = GetUnitX(source) set y2 = GetUnitY(source) set facing = Atan2(y2 - y, x2 - x) set x = x + speed*Cos(facing) set y = y + speed*Sin(facing) set distSq = (y2-y)*(y2-y) + (x2-x)*(x2-x) if sourceFlying then set z = z + speed*(GetUnitFlyHeight(source) - z)/SquareRoot(distSq) call SetUnitFlyHeight(missile, z, 0) endif call SetUnitX(missile, x) call SetUnitY(missile, y) call SetUnitFacing(missile, facing*bj_RADTODEG) if distSq <= distSquared then call UnitDamageTarget(caster, source, damage, false, false, ATTACK_TYPE, DAMAGE_TYPE, null) call remove() endif else call remove() endif endmethod //pick all dmgHandler structs private static method moveAll takes nothing returns nothing local thistype node = globalHead.next if node == 0 then call PauseTimer(periodic) else loop exitwhen node == 0 call node.move() set node = node.next endloop endif endmethod method createMissile takes Body b returns nothing local real scale = damage*5.00/maxHp //missile size depends on the damage returned //proportional to the max Hp static if LIBRARY_MissileRecycler then local real x2 = GetUnitX(source) local real y2 = GetUnitY(source) endif set caster = b.caster set x = GetUnitX(b.body) set y = GetUnitY(b.body) set z = MISSILE_HEIGHT static if LIBRARY_MissileRecycler then //facing angle matters in MissileRecycler to preserve missile dummies set missile = GetRecycledMissile(x, y, MISSILE_HEIGHT, bj_RADTODEG*Atan2(y2-y, x2-x)) static if MISSILE_HAS_VISION then call SetUnitOwner(missile, GetOwningPlayer(caster), false) endif else //facing angle don't matter because it will be set periodically static if MISSILE_HAS_VISION then set missile = CreateUnit(GetOwningPlayer(caster), 'dumi', x, y, 0) else set missile = CreateUnit(neutral, 'dumi', x, y, 0) endif call SetUnitFlyHeight(missile, MISSILE_HEIGHT, 0) call PauseUnit(missile, true) endif if scale > MAX_MISSILE_SCALE then set scale = MAX_MISSILE_SCALE elseif scale < MIN_MISSILE_SCALE then set scale = MIN_MISSILE_SCALE endif call SetUnitScale(missile, scale, scale, scale) set sfx = AddSpecialEffectTarget(b.missileSfx, missile, "origin") endmethod method initializeMissile takes Body b, unit killer returns nothing local thistype node = next local thistype tail //Pick all DmgHandler and create the missiles loop exitwhen node == 0 set tail = node if UnitAlive(node.source) then if node.source == killer then set node.damage = node.damage*KillerDamageFactor(b.level) else set node.damage = node.damage*DamageFactor(b.level) endif set node.speed = MissileSpeed(b.level)*TIMEOUT call node.createMissile(b) else call node.remove() endif set node = node.next endloop //if there is currently nothing on the globalList, start the timer if globalHead.next == 0 then call TimerStart(periodic, TIMEOUT, true, function thistype.moveAll) endif //---------- INSERT THE LIST TO THE GLOBAL LIST --------------- set tail.next = globalHead.next //Add link to global List if globalHead.next != 0 then set globalHead.next.prev = tail endif set globalHead.next = next //next to globalHead is the next of dmgHead set next.prev = globalHead endmethod endstruct struct Body extends array implement Alloc private DmgHandler dmgHead //For reference on the list of units that damages the body private Table dmgTb //Getting the struct instance at trigger events //members inherited to the DmgHandler readonly unit caster readonly unit body readonly integer level readonly string missileSfx readonly boolean hasCaster //to determine if body has caster's soul or not private player owner //for automatically selecting body when transferring private string damageSfx //the damage effect when soul-less body is hit static if not DAMAGE_ON_EXPIRE then private boolean deathByDamage //tells whether a body dies by damage (true) or by timer expiring (false) endif //Struct Triggers private trigger uponDamage private trigger uponCast private trigger uponDeath static if DAMAGE_ON_EXPIRE and not INHERIT_ITEMS then else private trigger uponLowHp //Will only be needed if: (OR CONDITION) //1. It needs to identify whether it dies via timer expiration or damage (DAMAGE_ON_EXPIRE = false) //2. Bodies have Inventories therefore it is needed to detect when it is about // to die to avoid Bodies reincarnating (INHERIT_ITEMS = true) endif //for linking private thistype head private thistype next private thistype prev //Destroy the Body struct private method destroy takes nothing returns nothing local thistype node static if INHERIT_ITEMS then local integer i = 0 loop exitwhen i > 5 call RemoveItem(UnitItemInSlot(body, i)) set i = i + 1 endloop endif //Remove Leaks //Trigger uponDeath must be destroyed first before Killing to avoid unnecessary looping call DestroyTrigger(uponDeath) call DestroyTrigger(uponDamage) call DestroyTrigger(uponCast) static if DAMAGE_ON_EXPIRE and not INHERIT_ITEMS then else call DestroyTrigger(uponLowHp) endif if UnitAlive(body) then call KillUnit(body) endif //Remove from the link set prev.next = next set next.prev = prev if this == head then //If this == head, reassign the head of all instances set node = this loop exitwhen node == 0 set node.head = next set node = node.next endloop endif //cleaning handle references set body = null set caster = null set owner = null static if not DAMAGE_ON_EXPIRE then set deathByDamage = false endif static if DAMAGE_ON_EXPIRE and not INHERIT_ITEMS then else set uponLowHp = null endif set uponDeath = null set uponDamage = null set uponCast = null //---------------------- call tbId.remove(GetHandleId(body)) call dmgTb.destroy() call dmgHead.remove() call deallocate() endmethod //---------------------------------------------------------------------------------- //-- When a soul-less Elemental Body dies, return all damage taken to the source --- //---------------------------------------------------------------------------------- private method returnDamage takes unit killer returns nothing call dmgHead.initializeMissile(this, killer) call destroy() endmethod //---------------------------------------------------------------------------------- //-------- When an Elemental Body (with soul) dies, do not return damage ---------- //---------------------------------------------------------------------------------- private method noReturnDamage takes nothing returns nothing local DmgHandler node = dmgHead.next loop exitwhen node == 0 call node.remove() set node = node.next endloop call destroy() endmethod private static method changeProperties takes nothing returns nothing static if LIBRARY_TimerUtilsEx then local thistype this = ReleaseTimer(GetExpiredTimer()) elseif LIBRARY_TimerUtils then local timer t = GetExpiredTimer() local thistype this = GetTimerData(t) else local timer t = GetExpiredTimer() local integer id = GetHandleId(t) local thistype this = tbId[id] endif local real newMana = GetUnitState(body, UNIT_STATE_MANA) local thistype tempNode = head //Decrease other Bodies' mana and copy item charges loop exitwhen tempNode == 0 if not tempNode.hasCaster then call SetUnitState(tempNode.body, UNIT_STATE_MANA, newMana) static if INHERIT_ITEMS then call CopyItemCharges(body, tempNode.body) endif endif set tempNode = tempNode.next endloop static if LIBRARY_TimerUtils then call ReleaseTimer(t) set t = null else if not LIBRARY_TimerUtilsEx then call PauseTimer(t) call DestroyTimer(t) call tbId.remove(id) set t = null endif endmethod private static method addSoulTransfer takes nothing returns nothing static if LIBRARY_TimerUtilsEx then local thistype this = ReleaseTimer(GetExpiredTimer()) elseif LIBRARY_TimerUtils then local timer t = GetExpiredTimer() local thistype this = GetTimerData(t) else local timer t = GetExpiredTimer() local integer id = GetHandleId(t) local thistype this = tbId[id] endif //------------------------------- call UnitRemoveAbility(body, SOUL_TRANSFER_COOLDOWN) call UnitAddAbility(body, SOUL_TRANSFER) //------------------------------- static if LIBRARY_TimerUtils then call ReleaseTimer(t) set t = null else if not LIBRARY_TimerUtilsEx then call PauseTimer(t) call DestroyTimer(t) call tbId.remove(id) set t = null endif endmethod private static method onAbilityCast takes nothing returns boolean local thistype this = tbId[GetHandleId(GetTriggerUnit())] local thistype newThis local unit new local integer i = 1 local integer id static if not LIBRARY_TimerUtils and not LIBRARY_TimerUtilsEx then local timer t endif //If Soul Transfer is used if GetSpellAbilityId() == SOUL_TRANSFER then set new = GetSpellTargetUnit() set id = GetUnitTypeId(new) set newThis = tbId[GetHandleId(new)] //If the target unit is an elemental body (tbId.has(id)) //If the target unit belongs to the same caster (newThis.caster == caster) if tbId.has(id) and newThis.caster == caster then set hasCaster = false set newThis.hasCaster = true //Automatically select the new body if owner == GetLocalPlayer() then call ClearSelection() call SelectUnit(new, true) endif //remove the Soul Transfer ability and start the timing call UnitRemoveAbility(body, SOUL_TRANSFER) static if not LIBRARY_TimerUtils and not LIBRARY_TimerUtilsEx then set t = CreateTimer() set tbId[GetHandleId(t)] = newThis call TimerStart(t, Cooldown(level), false, function thistype.addSoulTransfer) set t = null else call TimerStart(NewTimerEx(newThis), Cooldown(level), false, function thistype.addSoulTransfer) endif //Exchange Items static if INHERIT_ITEMS then call ExchangeItems(new, body) endif //---SILENCING--- //Silence the old body call SetUnitX(dummy, GetUnitX(body)) call SetUnitY(dummy, GetUnitY(body)) if IssueTargetOrderById(dummy, 852583, body) then debug else debug call BJDebugMsg("[|cffffcc00ELEMENTAL BODY|r]: Failed to Silenced Soul-Less Body ") endif //Remove fake silence of old body call UnitRemoveAbility(body, FAKE_SILENCE) call UnitRemoveAbility(body, FAKE_SILENCE_BUFF) //Unsilence the new body call UnitRemoveAbility(new, REAL_SILENCE_BUFF) call UnitAddAbility(new, FAKE_SILENCE) //Coloring call SetUnitVertexColor(new, 255, 255, 255, 255) if IsUnitAlly(body, GetLocalPlayer()) then call SetUnitVertexColor(body, 0, 0, 255, 255) endif //---Transfer SOUL_TRANFER Ability--- call UnitRemoveAbility(body, SOUL_TRANSFER) //Fake ability with cooldown call UnitAddAbility(new, SOUL_TRANSFER_COOLDOWN) call SetUnitAbilityLevel(new, SOUL_TRANSFER_COOLDOWN, level) call SetUnitX(dummy, GetUnitX(new)) call SetUnitY(dummy, GetUnitY(new)) call IssueTargetOrderById(dummy, 852075, new) endif endif //Reduce mana of all elemental bodies static if not LIBRARY_TimerUtils and not LIBRARY_TimerUtilsEx then set t = CreateTimer() set tbId[GetHandleId(t)] = this call TimerStart(t, 0.00, false, function thistype.changeProperties) set t = null else call TimerStart(NewTimerEx(this), 0.000, false, function thistype.changeProperties) endif return false endmethod private static method onDeath takes nothing returns boolean local unit u = GetTriggerUnit() local integer handleId = GetHandleId(u) local thistype this = tbId[handleId] local unit killer local thistype tempNode = head set killer = GetKillingUnit() if hasCaster then call SetUnitState(caster, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MANA)) call noReturnDamage() //Kill other elemental bodies loop exitwhen tempNode == 0 //If caster dies, kill all other elemental bodies if not tempNode.hasCaster then //If this is the last node, then move the position if tempNode.next == 0 then call SetUnitX(tempNode.body, GetUnitX(u)) call SetUnitY(tempNode.body, GetUnitY(u)) endif static if DAMAGE_ON_EXPIRE then call tempNode.returnDamage(null) else call tempNode.noReturnDamage() endif endif set tempNode = tempNode.next endloop else static if DAMAGE_ON_EXPIRE then call returnDamage(killer) else //if it will not damage on expire, but elemental body dies from damage if deathByDamage then call returnDamage(killer) else call noReturnDamage() endif endif endif set killer = null return false endmethod static if DAMAGE_ON_EXPIRE and not INHERIT_ITEMS then else private static method onLowHp takes nothing returns boolean local thistype this = tbId[GetHandleId(GetTriggerUnit())] local integer i = 0 static if not DAMAGE_ON_EXPIRE then set deathByDamage = true endif static if INHERIT_ITEMS then if hasCaster then call ExchangeItems(caster, body) endif //Remove all items to prevent reincarnation if any loop exitwhen i > 5 call RemoveItem(UnitItemInSlot(body, i)) set i = i + 1 endloop endif return false endmethod endif private static method onDamage takes nothing returns boolean local real damageTaken = GetEventDamage() local integer handleId local thistype this local unit u local unit damaged local string sfx local DmgHandler dmg //temp damage list node if damageTaken > 0 then set damaged = GetTriggerUnit() set u = GetEventDamageSource() if TargetFilter(u, damaged) then set handleId = GetHandleId(u) set this = tbId[GetHandleId(damaged)] //find the instance of the damaged unit if not hasCaster then if not(dmgTb.has(handleId)) then //If the Damage Source is new set dmg = dmgHead.insert(u) //add node to the damage list set dmgTb[handleId] = dmg //store the node to the Table, for retrieval later set dmg.damage = damageTaken if IsUnitType(u, UNIT_TYPE_FLYING) then set dmg.sourceFlying = true endif elseif not hasCaster then set dmg = dmgTb[handleId] //retrieve the node based on the damage source set dmg.damage = dmg.damage + damageTaken endif set sfx = damageSfx if not IsUnitAlly(body, GetLocalPlayer()) then set sfx = "" endif call DestroyEffect(AddSpecialEffectTarget(sfx, u, "origin")) endif endif endif set u = null return false endmethod //periodically silence the summoned body, stop when silencing succeed. private static method silenceEnum takes nothing returns nothing local unit u = GetEnumUnit() call SetUnitX(dummy, GetUnitX(u)) call SetUnitY(dummy, GetUnitY(u)) if IssueTargetOrderById(dummy, 852583, u) then call GroupRemoveUnit(unsilencedBodies, u) endif set u = null endmethod //pick all unsilencedBodies private static method continuousSilence takes nothing returns nothing call ForGroup(unsilencedBodies, function thistype.silenceEnum) if FirstOfGroup(unsilencedBodies) == null then call PauseTimer(silenceTimer) endif endmethod //When an Elemental Body is summoned private static method onSummon takes nothing returns boolean local thistype this local unit u = GetTriggerUnit() local integer i = 1 //for looping local integer end local integer index = 0 //used as index array local real maxLife local real maxMana static if INHERIT_ITEMS then //For creating the Bodies' items local item it local item it2 endif set index = tbId[GetUnitTypeId(u)] //retrieve the array index of the type of Elemental Body if index > 0 then set this = allocate() set damageSfx = bodyOnHitSfx[index] set missileSfx = bodyMissileSfx[index] set body = u set owner = GetOwningPlayer(u) set caster = GetSummoningUnit() //store the caster into the struct for certain purposes //such as damaging and comparing set dmgTb = dmgTb.create() //damage table is for checking if the damage source is in the //dmg list; avoids redundant/repeating nodes set level = GetUnitAbilityLevel(caster, ELEMENTAL_BODIES) if index == initialBody then set hasCaster = true call UnitAddAbility(u, SOUL_TRANSFER) call UnitAddAbility(u, FAKE_SILENCE) else set hasCaster = false if FirstOfGroup(unsilencedBodies) == null then call TimerStart(silenceTimer, TIMEOUT, true, function thistype.continuousSilence) endif call GroupAddUnit(unsilencedBodies, u) if IsUnitAlly(u, GetLocalPlayer()) then call SetUnitVertexColor(u, 0, 0, 255, 255) endif endif //Add abilities set i = index*MAX_NUM_SPELLS + 1 set end = MAX_NUM_SPELLS*(index + 1) loop exitwhen i > end call UnitAddAbility(u, bodySpells[i]) call SetUnitAbilityLevel(u, bodySpells[i], level) set i = i + 1 endloop //Inherit Items static if INHERIT_ITEMS then call UnitAddAbility(u, INVENTORY_ABILITY) set i = 0 loop exitwhen i > 5 set it = UnitItemInSlot(caster, i) if it == null then call UnitAddItemById(u, DUMMY_ITEM_ID) else set it2 = UnitAddItemById(u, GetItemTypeId(it)) call SetItemCharges(it2, GetItemCharges(it)) set it2 = null endif set i = i + 1 endloop //Destroy Dummy Items set i = 0 loop exitwhen i > 5 set it = UnitItemInSlot(u, i) if GetItemTypeId(it) == DUMMY_ITEM_ID then call RemoveItem(it) endif set i = i + 1 endloop //To preserve cooldown static if INHERIT_ITEMS then if hasCaster then call ExchangeItems(u, caster) endif endif set it = null endif //Set Elemental Body Max Life static if INHERIT_MAX_LIFE then set maxLife = GetUnitState(caster, UNIT_STATE_MAX_LIFE) else set maxLife = StaticHp(level) endif static if INCLUDE_LIFE_BONUS then set maxLife = maxLife + ExtraHp(level, u) endif call SetMaxProperty(u, maxLife, UNIT_STATE_MAX_LIFE) //Set Elemental Body Max Mana static if INHERIT_MAX_MANA then set maxMana = GetUnitState(caster, UNIT_STATE_MAX_MANA) else set maxMana = StaticMana(level) endif static if INCLUDE_MANA_BONUS then set maxMana = maxMana + ExtraMana(level, u) endif call SetMaxProperty(u, maxMana, UNIT_STATE_MAX_MANA) //Set Elemental Body Current Life static if USE_CURRENT_LIFE then //current life call SetWidgetLife(u, GetWidgetLife(caster)) else //max life call SetWidgetLife(u, GetUnitState(u, UNIT_STATE_MAX_LIFE)) endif //Set Elemental Body Current Mana static if USE_CURRENT_MANA then //current mana call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(caster, UNIT_STATE_MANA)) else //max mana call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MAX_MANA)) endif set dmgHead = dmgHead.create(maxLife) //Head of the list of units to damage uponDeath, maxLife is for //scaling reference for missile size //instance number recovery set tbId[GetHandleId(u)] = this //Linking if linkBody then set head = tempBodyHead set next = head.next set prev = head set next.prev = this set prev.next = this else set next = 0 set prev = 0 set tempBodyHead = this set head = tempBodyHead set linkBody = true endif //Detect when Body is about to die static if DAMAGE_ON_EXPIRE and not INHERIT_ITEMS then else set uponLowHp = CreateTrigger() call TriggerRegisterUnitStateEvent(uponLowHp, u, UNIT_STATE_LIFE, LESS_THAN_OR_EQUAL, 0.404998749) call TriggerAddCondition(uponLowHp, Condition(function thistype.onLowHp)) endif //Built-in DDS set uponDamage = CreateTrigger() call TriggerRegisterUnitEvent(uponDamage, u, EVENT_UNIT_DAMAGED) call TriggerAddCondition(uponDamage, Condition(function thistype.onDamage)) //Built-in Spell Event to avoid filtering condition which cost a Hashtable lookup //if tbId.has(GetUnitTypeId(GetTriggerUnit())) then set uponCast = CreateTrigger() call TriggerRegisterUnitEvent(uponCast, u, EVENT_UNIT_SPELL_EFFECT) call TriggerAddCondition(uponCast, Condition(function thistype.onAbilityCast)) //Built-in Death Trigger to avoid filtering condition which cost a Hashtable lookup //if tbId.has(GetUnitTypeId(GetTriggerUnit())) then set uponDeath = CreateTrigger() call TriggerRegisterUnitEvent(uponDeath, u, EVENT_UNIT_DEATH) call TriggerAddCondition(uponDeath, Condition(function thistype.onDeath)) endif set u = null return false endmethod private static method onCast takes nothing returns boolean static if RANDOM_INITIAL_BODY then //if initial body is random, then resets initialBody at every cast static if not LIBRARY_SpellEffectEvent then if GetSpellAbilityId() == ELEMENTAL_BODIES then set initialBody = GetRandomInt(1 , NumberOfBodies( GetUnitAbilityLevel(GetTriggerUnit(), ELEMENTAL_BODIES) ) ) endif else set initialBody = GetRandomInt(1 , NumberOfBodies( GetUnitAbilityLevel(GetTriggerUnit(), ELEMENTAL_BODIES) )) endif endif //call thistype.setMaxProperty(gg_unit_Otch_0008, 1234, UNIT_STATE_MAX_LIFE) set linkBody = false //Tells the spell system that the spell was cast //and should not initially link elemental bodies return false endmethod private static method onInit takes nothing returns nothing local integer i = 0 local integer j = 1 local integer index static if not LIBRARY_SpellEffectEvent then local trigger trg = CreateTrigger() endif loop call TriggerRegisterPlayerUnitEvent(uponSummon, Player(i), EVENT_PLAYER_UNIT_SUMMON, null) static if not LIBRARY_SpellEffectEvent then call TriggerRegisterPlayerUnitEvent(trg, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null) endif set i = i + 1 exitwhen i == bj_MAX_PLAYER_SLOTS endloop call TriggerAddCondition(uponSummon, Condition(function thistype.onSummon)) static if LIBRARY_SpellEffectEvent then call RegisterSpellEffectEvent(ELEMENTAL_BODIES, function thistype.onCast) else call TriggerAddCondition(trg, Filter(function thistype.onCast)) set trg = null endif //Create the Global Table for instance retrieval set tbId = tbId.create() //Create the Head of the Global List for all missile enumeration, input parameter don't matter set globalHead = globalHead.create(1) //The Hero Dummy Caster that can cast spells capable of penetrating spell immunity set dummy = CreateUnit(neutral, DUMMY_ID, 0, 0, 0) call SetHeroLevel(dummy, 10, false) call UnitAddAbility(dummy, REAL_SILENCE) call SelectHeroSkill(dummy, REAL_SILENCE) call UnitAddAbility(dummy, SOUL_TRANSFER_TRIGGER) //Preloading call UnitAddAbility(dummy, ELEMENTAL_BODIES) call UnitRemoveAbility(dummy, ELEMENTAL_BODIES) call UnitAddAbility(dummy, FAKE_SILENCE) call UnitRemoveAbility(dummy, FAKE_SILENCE) call UnitAddAbility(dummy, SOUL_TRANSFER) call UnitRemoveAbility(dummy, SOUL_TRANSFER) call UnitAddAbility(dummy, MAX_LIFE_MODIFIER) call UnitRemoveAbility(dummy, MAX_LIFE_MODIFIER) call UnitAddAbility(dummy, MAX_MANA_MODIFIER) call UnitRemoveAbility(dummy, MAX_MANA_MODIFIER) call UnitAddAbility(dummy, SOUL_TRANSFER_COOLDOWN) call UnitRemoveAbility(dummy, SOUL_TRANSFER_COOLDOWN) call UnitAddAbility(dummy, INVENTORY_ABILITY) call UnitRemoveAbility(dummy, INVENTORY_ABILITY) //For Modifying the Max Life and Max Mana set digitPlace[5] = 1000 set digitPlace[4] = 100 set digitPlace[3] = 10 set digitPlace[2] = 1 set digitPlace[1] = 0 call InitializeElementalBodies() set i = 1 loop exitwhen bodyId[i] == 0 set tbId[bodyId[i]] = i //Store the Unit-Type in Table to avoid O(n) time complexity via looping //Preload Body Spells set index = i*MAX_NUM_SPELLS set j = 1 loop exitwhen j > MAX_NUM_SPELLS call UnitAddAbility(dummy, bodySpells[index + j]) call UnitRemoveAbility(dummy, bodySpells[index + j]) set j = j + 1 endloop set i = i + 1 endloop endmethod endstruct //API that might be useful for AI triggering function ElementalBodyHasSoul takes unit u returns integer local Body this if tbId.has(GetUnitTypeId(u)) then set this = tbId[GetHandleId(u)] if this.hasCaster then return 2 //returns 2 if unit has caster's soul else return 1 //returns 1 if unit does not have caster's soul endif else return 0 //returns 0 if unit is not even an elemental body endif endfunction endlibrary
Spellcode Information
- 1345 lines of vJAss code (comments included).
- Requires Table and Alloc.
- Comes with some few useful APIs.
- Used 'static ifs' making the spell compiles based on what is configured avoiding unnecessary code compilation.
- Creates a permanent dummy caster in the map that handles all dummy casting. Prevents create-remove dummy casters in each cast.
Spell Object Information
- Comes with 9 Abilities ('Elemental Bodies' ability included).
- Comes with 2 Buffs.
- Each Elemental Body's Spells are not part of the entry, they are configurable.
Spell Strategy (based on Map Demo configuration)
This spell mostly fit in AoS, Hero Arena and Hero Defense maps.
- Trick your opponents into thinking a certain Elemental Body has Panda's soul even though it really isn't by:
* Casting Spell then Soul Transfering without enemies knowing. Enemies will think Panda's Soul is still within the Body that casted the Spell.
* Fake casting Soul Transfer by making the Elemental Body face another Body, opponents will think you cast Soul Transfer when you actually didn't.
- Don't be afraid to take the front line during clash because they will most likely ignore you because of the Return Damage.
- At Level 3, you can easily escape by transfering soul to Wind Elemental and then using Wind Walk.
- It is best to cast this on full HP so that Elemental Bodies will also have full HP.
Ability Notes (some can be configured)
- Elemental Bodies summoned will have a max Life, max Mana, current Life and current Mana equal to Panda's.
- When an Elemental Body cast a spell, all other Bodies will have its mana updated. But when a certain Body has its mana increased, all other Bodies will be unaffected.
- Soul-less bodies will have their inventory changed when a Body with Panda's Soul uses an item.
- Soul Transfer Cooldown is shared, meaning when a Body cast Soul Transfer, the new Body will have its Soul Transfer on Cooldown.
- The Special Effects when a Soul-less body is damaged is only visible to that Body's allies.
- Soul-less Body will have a different vertex coloring that is only visible to that Body's allies.
- All item cooldowns will also be transferred upon casting Soul Transfer.
- Elemental Bodies' missile size is proportional to its damage.
- Elemental Bodies cannot reincarnate.
- Soul-less Bodies cannot return HP removal damage such as Negative Life Regeneration but it will still return damage to other types of damages and it will still trigger if it dies via HP removal.
- Missiles have 400/400 (day/night) sight radius.
- Does not return damage to Structures.
- Panda's Soul's initial Elemental Body is random.
Images
Shared Cooldown
Fire Body dying
Storm Body dying
Type 1 Part 1
Type 1 Part 2
Type 2 Part 1
Type 2 Part 2
Panda used Dagger
![]()
Elemental Body's Dagger is on cooldown because Panda used it
![]()
Earth used Dagger
![]()
Storm's dagger is on cooldown after Soul Transfer because Earth used it
![]()
Part 1
Part 2
Part 3
![]()
![]()
![]()
Part 1
Part 2
![]()
![]()
Nice entry guys. I still don't know how to make a HTML table like that :|