- Joined
- Sep 26, 2009
- Messages
- 9,547
I'm really thankful that you are a part of the WC3 community, Tank-Commander.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Well I did say I had a week, got to put in the extra hours!You are just scary, man.
I appreciate the sentiment it means a lot coming from youBribe said:I'm really thankful that you are a part of the WC3 community, Tank-Commander.
Got any screenshots? I'm curious to see how that idea pans out visually - it sounds really interesting
...
Bah, all ideas I got are either too simple or 'copied'
ShapeShift

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Shape Shift

Actions


Set SS_Caster = (Casting unit)


Set SS_Point[1] = (Target point of ability being cast)


Set SS_Point[2] = (Position of SS_Caster)


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


Set SS_AoE_Scan = 0.00


For each (Integer A) from 1 to 185, do (Actions)



Loop - Actions




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





If - Conditions






SS_TargetDestructible Equal to No destructible





Then - Actions






Set SS_AoE_Scan = (SS_AoE_Scan + 1.00)






Destructible - Pick every destructible within SS_AoE_Scan of SS_Point[1] and do (Actions)







Loop - Actions








Set SS_TargetDestructible = (Picked destructible)





Else - Actions


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



If - Conditions




SS_TargetDestructible Not equal to No destructible



Then - Actions




Set SS_Point[3] = (Position of SS_TargetDestructible)




Set SS_DestructibleType = (Destructible-type of SS_TargetDestructible)




Unit - Turn collision for SS_Caster Off




Destructible - Create a SS_DestructibleType at SS_Point[2] facing (Random angle) with scale 1.00 and variation 0




Game - Display to (All players) the text: (String(SS_AoE_Scan))




Game - Display to (All players) the text: (Name of SS_TargetDestructible)




Special Effect - Create a special effect at SS_Point[3] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl




Special Effect - Destroy (Last created special effect)




Set SS_TargetDestructible = No destructible



Else - Actions




Set SS_AoE_Scan = 0.00




For each (Integer A) from 1 to 170, do (Actions)





Loop - Actions






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







If - Conditions








SS_TargetUnit Equal to No unit







Then - Actions








Set SS_AoE_Scan = (SS_AoE_Scan + 1.00)








Set SS_TargetUnit = (Random unit from (Units within SS_AoE_Scan of SS_Point[1] matching (((((Owner of (Matching unit)) Equal to Neutral Passive) or (((Matching unit) belongs to an enemy of (Owner of SS_Caster)) Equal to True)) and (((Matching unit) is alive) Equal to True)) and







Else - Actions




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





If - Conditions






SS_TargetUnit Not equal to No unit





Then - Actions






Set SS_Point[3] = (Position of SS_TargetUnit)






Set SS_UnitType = (Unit-type of SS_TargetUnit)






Special Effect - Create a special effect at SS_Point[3] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl






Special Effect - Destroy (Last created special effect)






Game - Display to (All players) the text: (String(SS_AoE_Scan))






Game - Display to (All players) the text: (Name of SS_TargetUnit)






Set SS_TargetUnit = No unit





Else - Actions
ShapeShift

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Shape Shift

Actions


Set SS_TempPoint[1] = (Target point of ability being cast)


Destructible - Pick every destructible within 150.00 of SS_TempPoint[1] and do (Actions)



Loop - Actions




Set SS_TargetDestructible = (Picked destructible)


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 150.00 of SS_TempPoint[1] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is A Hero) Equal to False)) and ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) or ((Ow Greater than 0






SS_TargetDestructible Not equal to No destructible



Then - Actions




Set SS_Index = (SS_Index + 1)




Set SS_Caster[SS_Index] = (Casting unit)




Set SS_Point[SS_Index] = (Position of SS_Caster[SS_Index])




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




Set SS_AoE_Scan = 0.00




For each (Integer A) from 1 to 185, 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_TargetUnit Equal to No unit










SS_TargetDestructible Equal to No destructible







Then - Actions








Set SS_TargetUnit = (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







Else - Actions






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







If - Conditions








SS_TargetUnit Equal to No unit








SS_TargetDestructible 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_TargetDestructible = (Picked destructible)







Else - Actions




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





If - Conditions






SS_TargetDestructible Not equal to No destructible





Then - Actions






Set SS_DestructibleType = (Destructible-type of SS_TargetDestructible)






Unit - Hide SS_Caster[SS_Index]






Destructible - Create a SS_DestructibleType at SS_Point[SS_Index] facing (Random angle) with scale 1.00 and variation 0






Unit - Unhide SS_Caster[SS_Index]






Set SS_Destructible[SS_Index] = (Last created destructible)






Unit - Turn collision for SS_Caster[SS_Index] Off






Unit - Move SS_Caster[SS_Index] instantly to SS_Point[SS_Index]






Game - Display to (All players) the text: (String(SS_AoE_Scan))






Game - Display to (All players) the text: (Name of SS_Destructible[SS_Index])






Set SS_TargetDestructible = No destructible





Else - Actions






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







If - Conditions








SS_TargetUnit Not equal to No unit







Then - Actions








Set SS_UnitType = (Unit-type of SS_TargetUnit)








Unit - Hide SS_Caster[SS_Index]








Unit - Create 1 SS_UnitType for (Owner of SS_TargetUnit) at SS_Point[SS_Index] facing (Facing of SS_Caster[SS_Index]) degrees








Set SS_ShapeShiftUnit[SS_Index] = (Last created unit)








Unit - Unhide SS_Caster[SS_Index]








Unit - Turn collision for SS_Caster[SS_Index] Off








Unit - Move SS_Caster[SS_Index] instantly to SS_Point[SS_Index]








Custom script: call UnitAddAbility(udg_SS_Caster[udg_SS_Index],'Aloc')








Unit - Create 1 Shape Shift (SS Dummy) for (Owner of SS_Caster[SS_Index]) at SS_Point[SS_Index] facing (Facing of SS_Caster[SS_Index]) degrees








Set SS_Command_Unit[SS_Index] = (Last created unit)








Unit - Turn collision for SS_Command_Unit[SS_Index] Off








Unit - Make SS_Command_Unit[SS_Index] Invulnerable








Unit - Add Crow Form to SS_Command_Unit[SS_Index]








Animation - Change SS_Command_Unit[SS_Index] flying height to 1000000000.00 at 0.00








Unit - Remove Crow Form from SS_Command_Unit[SS_Index]








Unit - Add Crow Form to SS_Caster[SS_Index]








Animation - Change SS_Caster[SS_Index] flying height to 1000000000.00 at 0.00








Unit - Remove Crow Form from SS_Caster[SS_Index]








Selection - Select SS_Command_Unit[SS_Index] for (Owner of SS_Caster[SS_Index])








Game - Display to (All players) the text: (String(SS_AoE_Scan))








Game - Display to (All players) the text: (Name of SS_TargetUnit)








Set SS_TargetUnit = No unit








Set SS_UnitType = No unit-type







Else - Actions




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





If - Conditions






SS_Index Equal to 1





Then - Actions






Game - Display to (All players) for 1.00 seconds the text: ON






Trigger - Turn on ShapeShift Loop <gen>





Else - Actions



Else - Actions


Custom script: call RemoveLocation (udg_SS_TempPoint[1])
ShapeShift Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Game - Display to (All players) for 0.01 seconds the text: LOOP


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_Command_Unit[SS_Loop] Not equal to No unit





Then - Actions






Set SS_Point[SS_Loop] = (Position of SS_ShapeShiftUnit[SS_Loop])






Set SS_FacingAngle = (Facing of SS_ShapeShiftUnit[SS_Loop])






Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop], facing SS_FacingAngle degrees






Unit - Move SS_Command_Unit[SS_Loop] instantly to SS_Point[SS_Loop], facing SS_FacingAngle degrees






Custom script: call RemoveLocation (udg_SS_Point[udg_SS_Loop])





Else - Actions






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







If - Conditions








SS_TargetDestructible Not equal to No destructible







Then - Actions








Set SS_Point[SS_Loop] = (Position of SS_Destructible[SS_Loop])








Set SS_FacingAngle = 270.00








Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop], facing SS_FacingAngle degrees








Unit - Move SS_Command_Unit[SS_Loop] instantly to SS_Point[SS_Loop], facing SS_FacingAngle degrees








Custom script: call RemoveLocation (udg_SS_Point[udg_SS_Loop])







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


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






(Ordered unit) Equal to SS_Command_Unit[SS_Loop]





Then - Actions






Set SS_OrderCheckerUnit = (Target unit of issued order)






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







If - Conditions








SS_OrderCheckerUnit Not equal to No unit







Then - Actions








Set SS_TempPoint[2] = (Position of 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










Set SS_TempPoint[2] = (Position of 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
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






And - All (Conditions) are true







Conditions








SS_ShapeShiftUnit[SS_Loop] Equal to (Triggering unit)








(Owner of (Triggering unit)) Equal to (Owner of (Triggering unit))





Then - Actions






Selection - Remove (Triggering unit) from selection for (Owner of (Triggering unit))






Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])





Else - Actions






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







If - Conditions








And - All (Conditions) are true









Conditions










SS_Command_Unit[SS_Loop] Equal to (Triggering unit)










(Owner of (Triggering unit)) Not equal to (Owner of (Triggering unit))







Then - Actions








Selection - Remove (Triggering unit) from selection







Else - Actions
ShapeShift Revert Death

Events


Unit - A unit Dies

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_ShapeShiftUnit[SS_Loop] Equal to (Dying unit)





Then - Actions






Unit - Remove SS_Command_Unit[SS_Loop] from the game






Unit - Remove SS_ShapeShiftUnit[SS_Loop] from the game






Unit - Hide SS_Caster[SS_Loop]






Custom script: call UnitRemoveAbility (udg_SS_Caster[udg_SS_Loop],'Aloc')






Unit - Unhide SS_Caster[SS_Loop]






Unit - Add Crow Form to SS_Caster[SS_Index]






Animation - Change SS_Caster[SS_Index] flying height to 0.00 at 0.00






Unit - Remove Crow Form from SS_Caster[SS_Index]






Selection - Select SS_Caster[SS_Loop] for (Owner of SS_Caster[SS_Loop])






Destructible - Remove SS_Destructible[SS_Loop]






Set SS_Caster[SS_Loop] = SS_Caster[SS_Index]






Set SS_Point[SS_Loop] = SS_Point[SS_Index]






Set SS_Destructible[SS_Loop] = SS_Destructible[SS_Index]






Set SS_Command_Unit[SS_Loop] = SS_Command_Unit[SS_Index]






Set SS_ShapeShiftUnit[SS_Loop] = SS_ShapeShiftUnit[SS_Index]






Set SS_Index = (SS_Index - 1)






Set SS_Loop = (SS_Loop - 1)






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







If - Conditions








SS_Index Equal to 0







Then - Actions








Game - Display to (All players) for 1.00 seconds the text: OFF








Trigger - Turn off ShapeShift Loop <gen>







Else - Actions





Else - Actions
I'll do it in the morning, it's 1:20am here.Image or two would be good too

library Dispersion requires Alloc RegisterPlayerUnitEvent SpellEffectEvent
globals
private constant integer ABIL_ID = 'mrge'
private constant integer IMAGE_ID = 'mirg'
private constant real TIMEOUT = 0.031250000
/*
* Spell Radius (On Cast)
*/
private constant real MIN_RADIUS = 500
private constant real BASE_CAST_RADIUS = 600
private constant real CAST_RADIUS_PER_LVL = 200
/*
* Spell Radius (On Hit)
*/
private constant real BASE_DMG_RADIUS = 400
private constant real DMG_RADIUS_PER_LVL = 0
/*
* Damage (Target)
*/
private constant real BASE_DAMAGE = 100
private constant real DAMAGE_PER_LVL = 100
/*
* Bonus Damage
*/
private constant real BASE_BONUS_DMG = 0
private constant real BONUS_DMG_PER_LVL = 10
/*
* Damage (AoE)
*/
private constant real BASE_AOE_DMG = BASE_DAMAGE
private constant real AOE_DMG_PER_LVL = DAMAGE_PER_LVL
/*
* Mirage Duration
*/
private constant real MIRAGE_DURATION = 1.5
/*
* SFX
*/
/*
* On Cast
*/
private constant string ON_CAST_SFX = "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl"
/*
* Target Unit Mark
*/
private constant string TARGET_MARK_SFX = "Abilities\\Spells\\Items\\PotionOfOmniscience\\CrystalBallCaster.mdl"
private constant string TARGET_MARK_ATTACH = "overhead"
/*
* Illusion Speed
*/
private constant real ILLUSION_SPEED = 522
/*
* Illusion Disappear SFX
*/
private constant string ON_IMAGE_DEATH_SFX = "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl"
/*
* Illusion Trail Interval
*/
private constant real TRAIL_INTERVAL = 0.2
/*
* Illusion Trail Duration
*/
private constant real TRAIL_DURATION = 0.5
/*
* Image RGB color (0 to 255)
*/
private constant real TRAIL_R = 255
private constant real TRAIL_G = 255
private constant real TRAIL_B = 255
endglobals
private struct Trail extends array
implement Alloc
private real time
private unit u
private static integer array n
private static integer array p
private static integer count = 0
private static timer t = CreateTimer()
method destroy takes nothing returns nothing
call deallocate()
call RemoveUnit(u)
set u = null
set time = 0
set n[p[this]] = n[this]
set p[n[this]] = p[this]
set count = count - 1
if count == 0 then
call PauseTimer(t)
endif
endmethod
private static method period takes nothing returns nothing
local integer this = n[0]
loop
exitwhen this == 0
if time > 0 then
call SetUnitVertexColor(u, 255, 255, 255, 255*time/TRAIL_DURATION)
set time = time - TIMEOUT
else
call destroy()
endif
set this = n[this]
endloop
endmethod
endstruct
endlibrary
scope SpiritPain
native UnitAlive takes unit u returns boolean
globals
//-----------------------------------------------------------------
//-------------------------CONFIGURABLES---------------------------
//-----------------------------------------------------------------
private constant integer SPIRIT_PAIN = 'AspP'
private constant integer SPIRIT_TRANSFER = 'Assw'
private constant integer SILENCE = 'Asil'
private constant real SWAP_CD = 3.0
private constant integer FIRE_ID = 'fire'
private constant integer EARTH_ID = 'eart'
private constant integer STORM_ID = 'strm'
private constant boolean RANDOM_INITIAL_BODY = true
private integer initialBody = STORM_ID //Where the spirit of the caster will be at start, will not work if RANDOM_INITIAL_BODY = true
private constant boolean DAMAGE_ON_EXPIRE = false //Set whether a Spirit expiring will return all damage taken
private constant real DAMAGE_FACTOR = 1.50 //All damage taken by a non-occupied spirit will return to the source scaled to DAMAGE_FACTOR
private constant real KILLER_DAMAGE_FACTOR = 2.00 //All damage taken by a non-ocuupied dying spirit will return damage to its killer scaled to KILLER_DAMAGE_FACTOR
private constant attacktype ATTACK_TYPE = ATTACK_TYPE_NORMAL
private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_MAGIC
//-----------------------------------------------------------------
//-------------------------SYSTEM VARIABLES------------------------
//-----------------------------------------------------------------
endglobals
private struct DmgHandler extends array
implement List
unit source //Source of the Damage
real damage //Total Damage Taken from the Source
endstruct
globals
private Body tempBody
private Table tbId //Table for Instance Id
private trigger uponSummon = CreateTrigger()
private trigger uponDeath = CreateTrigger()
private boolean linkBody
endglobals
struct Body extends array
implement Alloc
private DmgHandler dmgList //List of units that damages the body
private Table dmgTb
private unit caster
private unit body
private real hp //for detecting if body dies due to timer expiration
private boolean hasCaster
private timer cdTimer
private trigger uponDamage
private thistype next
private static method addSwap takes nothing returns nothing
endmethod
private static method onSwap takes nothing returns nothing
local unit new = GetSpellTargetUnit()
local integer unitType = GetUnitTypeId(new)
local thistype this
if unitType == FIRE_ID or unitType == EARTH_ID or unitType == STORM_ID then
set this = tbId[GetHandleId(GetTriggerUnit())]
set hasCaster = false
set thistype[tbId[GetHandleId(new)]].hasCaster = true
call SetUnitVertexColor(new, 255, 255, 255, 255)
if IsUnitAlly(body, GetLocalPlayer()) then
call SetUnitVertexColor(body, 0, 0, 255, 255)
endif
call UnitRemoveAbility(body, SPIRIT_TRANSFER)
call UnitAddAbility(new, SPIRIT_TRANSFER)
endif
endmethod
private static method onDeath takes nothing returns boolean
local unit u = GetTriggerUnit()
local integer unitType = GetUnitTypeId(u)
local thistype this
local unit killer
local DmgHandler dmg //dmg is a temp List
local integer i = 1
if unitType == FIRE_ID or unitType == EARTH_ID or unitType == STORM_ID then
set this = tbId[GetHandleId(u)]
call BJDebugMsg("Body dies")
set killer = GetKillingUnit()
set dmg = dmgList.first
if hasCaster then
if hp < 0.405 then
//Kill other panda bodies
call BJDebugMsg(GetUnitName(next.body))
call BJDebugMsg(GetUnitName(next.next.body))
if UnitAlive(next.body) then
call KillUnit(next.body)
endif
if UnitAlive(next.next.body) then
call KillUnit(next.next.body)
endif
if killer != null then
call UnitDamageTarget(killer, caster, 9999999.9, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
else
call KillUnit(caster)
endif
call SetUnitX(caster, GetUnitX(u))
call SetUnitY(caster, GetUnitY(u))
endif
else
static if not DAMAGE_ON_EXPIRE then
if hp >= 0.405 then
set dmg.damage = 0.0
endif
endif
loop
exitwhen dmg == dmg.sentinel
if dmg.source == killer then
call UnitDamageTarget(caster, dmg.source, KILLER_DAMAGE_FACTOR*dmg.damage, false, false, ATTACK_TYPE, DAMAGE_TYPE, null)
else
call UnitDamageTarget(caster, dmg.source, DAMAGE_FACTOR*dmg.damage, false, false, ATTACK_TYPE, DAMAGE_TYPE, null)
endif
set dmg = dmg.next//Move on to the next node
endloop
endif
call DestroyTrigger(uponDamage)
call dmgTb.destroy()
call dmgList.destroy()
call deallocate()
set killer = null
endif
set u = null
return false
endmethod
private static method onDamage takes nothing returns boolean
//find the instance of the damaged unit
local thistype this = tbId[GetHandleId(GetTriggerUnit())]
local unit u = GetEventDamageSource()
local integer handleId = GetHandleId(u)
local real damageTaken = GetEventDamage()
local DmgHandler dmg //temp damage list node
if not(dmgTb.has(handleId)) then //If the Damage Source is new
set dmg = dmgList.enqueue() //add node to the damage list
set dmgTb[handleId] = dmg //store the node to the Table, for retrieval later
set dmg.source = u
set dmg.damage = damageTaken
elseif not hasCaster then
set dmg = dmgTb[handleId] //retrieve the node based on the damage source
set dmg.damage = dmg.damage + damageTaken
endif
set hp = GetWidgetLife(body) - damageTaken
set u = null
return false
endmethod
private static method onSummon takes nothing returns boolean
local thistype this
local unit u = GetTriggerUnit()
local integer unitType = GetUnitTypeId(u)
local integer i
if unitType == FIRE_ID or unitType == EARTH_ID or unitType == STORM_ID then
set this = allocate()
set body = u
if unitType == initialBody then
set hasCaster = true
call UnitAddAbility(body, SPIRIT_TRANSFER)
call UnitAddAbility(body, SILENCE)
call SetUnitState(body, UNIT_STATE_MANA, 500)
else
if IsUnitAlly(body, GetLocalPlayer()) then
call SetUnitVertexColor(body, 0, 0, 255, 255)
endif
endif
set caster = GetSummoningUnit() //store the caster into the struct for certain purposes
set dmgTb = dmgTb.create() //damage table is for checking if the damage source is in the dmgList; avoids redundant nodes
set dmgList = dmgList.create() //create a list of units to damage on death, initially empty
set hp = 1 //doesn't matter what value as long as it is not less than 0.405
//instance number recovery
set tbId[GetHandleId(body)] = this
//Linking
if linkBody then
if tempBody.caster == caster then
set next = tempBody
if tempBody.next.caster == caster then
set tempBody.next.next = this
endif
endif
else
set linkBody = true
endif
//Built-in DDS
set uponDamage = CreateTrigger()
call TriggerRegisterUnitEvent(uponDamage, body, EVENT_UNIT_DAMAGED)
call TriggerAddCondition(uponDamage, Condition(function thistype.onDamage))
//store the last instance for linking purposes
set tempBody = this
endif
set u = null
return false
endmethod
private static method onCast takes nothing returns nothing
local unit u = GetTriggerUnit()
static if RANDOM_INITIAL_BODY then
//if initial body is random, then resets initialBody at every cast
local integer rand = GetRandomInt(1,3)
call BJDebugMsg("Rand = " + I2S(rand))
if rand == 1 then
set initialBody = STORM_ID
elseif rand == 2 then
set initialBody = EARTH_ID
else
set initialBody = FIRE_ID
endif
endif
set linkBody = false //Tells the spell system that the spell was cast
set u = null
endmethod
private static method onInit takes nothing returns nothing
local integer i = 0
loop
call TriggerRegisterPlayerUnitEvent(uponSummon, Player(i), EVENT_PLAYER_UNIT_SUMMON, null)
call TriggerRegisterPlayerUnitEvent(uponDeath, Player(i), EVENT_PLAYER_UNIT_DEATH, null)
set i = i + 1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(uponSummon, Condition(function thistype.onSummon))
call TriggerAddCondition(uponDeath, Condition(function thistype.onDeath))
call RegisterSpellEffectEvent(SPIRIT_TRANSFER, function thistype.onSwap)
call RegisterSpellEffectEvent(SPIRIT_PAIN, function thistype.onCast)
set tbId = tbId.create()
//set tempBody = allocate()
endmethod
endstruct
endscope
ShapeShift

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Shape Shift

Actions


Set SS_TempPoint[1] = (Target point of ability being cast)


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] Equal to (Casting unit)





Then - Actions






Custom script: call RemoveLocation (udg_SS_TempPoint[1])






Skip remaining actions





Else - Actions


Destructible - Pick every destructible within 150.00 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_TargetDestructible = (Picked destructible)





Else - Actions


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 150.00 of SS_TempPoint[1] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is A Hero) Equal to False)) and ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) or ((Ow Greater than 0






SS_TargetDestructible Not equal to No destructible



Then - Actions




Set SS_TargetDestructible = No destructible




Set SS_Index = (SS_Index + 1)




Set SS_Caster[SS_Index] = (Casting unit)




Set SS_Point[SS_Index] = (Position of SS_Caster[SS_Index])




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




Set SS_AoE_Scan = 0.00




For each (Integer A) from 1 to 185, 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_TargetDestructible 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







Else - Actions






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







If - Conditions








SS_TempTargetUnit Equal to No unit








SS_TargetDestructible 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_TargetDestructible = (Picked destructible)







Else - Actions




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




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





If - Conditions






SS_TargetDestructible Not equal to No destructible





Then - Actions






Set SS_TargetHp_C[SS_Index] = (Current life of SS_TargetDestructible)






Set SS_DestructibleType_C[SS_Index] = (Destructible-type of SS_TargetDestructible)





Else - Actions






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)








Set SS_TargetMana_C[SS_Index] = (Mana of SS_TempTargetUnit)








Set SS_TargetHp_C[SS_Index] = (Life of SS_TempTargetUnit)








Set SS_UnitType_C[SS_Index] = (Unit-type of SS_TempTargetUnit)








Set SS_TempTargetUnit = No unit







Else - Actions




Set SS_DelayDuration[SS_Index] = 1.00




Set SS_Special_Effect_Height = 0.00




Unit Group - Add SS_Caster[SS_Index] to SS_AnimationGroup




For each (Integer A) from 1 to 10, do (Actions)





Loop - Actions






Unit - Create 1 SS TransformDummy 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) 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 + 30.00)




Set SS_SpecialEffectGroup[SS_Loop] = (Random 10 units from SS_Special_Effect_TempGroup)




Unit Group - Remove all units from SS_Special_Effect_TempGroup




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


Game - Display to (All players) for 0.01 seconds the text: ANIMATION LOOP


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_AnimationGroup) Equal to True





Then - Actions






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 300.00









Then - Actions










Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + 6.00) at 10000.00









Else - Actions










Animation - Change (Picked unit) flying height to 0.00 at 0.00





Else - Actions




Set SS_DelayDuration[SS_Loop] = (SS_DelayDuration[SS_Loop] - 0.03)




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





If - Conditions






SS_DelayDuration[SS_Loop] Less than or equal to 0.00






(SS_Caster[SS_Loop] is in SS_AnimationGroup) Equal to True





Then - Actions






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]






Unit Group - Remove SS_Caster[SS_Loop] from SS_AnimationGroup






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






Set SS_Point[SS_Loop] = (Position of SS_Caster[SS_Loop])






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







If - Conditions








SS_DestructibleType_C[SS_Loop] Not equal to (Destructible-type of No destructible)







Then - Actions








Set SS_StoredEXP[SS_Loop] = 0








Set SS_OriginalEXP[SS_Loop] = (Hero experience of SS_Caster[SS_Loop])








Unit - Hide SS_Caster[SS_Loop]








Destructible - Create a SS_DestructibleType_C[SS_Loop] at SS_Point[SS_Loop] facing (Random angle) with scale 1.00 and variation 0








Set SS_Destructible[SS_Loop] = (Last created destructible)








Destructible - Set life of SS_Destructible[SS_Loop] to SS_TargetHp_C[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]








Custom script: call UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Aloc')








Unit - Create 1 Shape Shift (SS Dummy) 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 - Add a 30.00 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 - Add Crow Form to SS_Command_Unit[SS_Loop]








Animation - Change SS_Command_Unit[SS_Loop] flying height to 1000000000.00 at 0.00








Unit - Remove Crow Form from SS_Command_Unit[SS_Loop]








Unit - Add Crow Form to SS_Caster[SS_Loop]








Animation - Change SS_Caster[SS_Loop] flying height to 1000000000.00 at 0.00








Unit - Remove Crow Form from SS_Caster[SS_Loop]








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 RevertDummy 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)







Else - Actions








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









If - Conditions










SS_UnitType_C[SS_Loop] Not equal to No unit-type









Then - Actions










Set SS_StoredEXP[SS_Loop] = 0










Set SS_OriginalEXP[SS_Loop] = (Hero experience of SS_Caster[SS_Loop])










Unit - Hide SS_Caster[SS_Loop]










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











If - Conditions












SS_OriginalOwner[SS_Loop] Equal to Neutral Hostile











Then - Actions












Unit - Create 1 SS_UnitType_C[SS_Loop] for Neutral Passive at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees











Else - Actions












Unit - Create 1 SS_UnitType_C[SS_Loop] for SS_OriginalOwner[SS_Loop] at SS_Point[SS_Loop] facing (Facing of SS_Caster[SS_Loop]) degrees










Set SS_ShapeShiftUnit[SS_Loop] = (Last created unit)










Unit - Set life of SS_ShapeShiftUnit[SS_Loop] to SS_TargetHp_C[SS_Loop]










Unit - Set mana of SS_ShapeShiftUnit[SS_Loop] to SS_TargetMana_C[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]










Custom script: call UnitAddAbility(udg_SS_Caster[udg_SS_Loop],'Aloc')










Unit - Create 1 Shape Shift (SS Dummy) 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 - Add a 30.00 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 - Add Crow Form to SS_Command_Unit[SS_Loop]










Animation - Change SS_Command_Unit[SS_Loop] flying height to 1000000000.00 at 0.00










Unit - Remove Crow Form from SS_Command_Unit[SS_Loop]










Unit - Add Crow Form to SS_Caster[SS_Loop]










Animation - Change SS_Caster[SS_Loop] flying height to 1000000000.00 at 0.00










Unit - Remove Crow Form from SS_Caster[SS_Loop]










Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])










Unit - Create 1 SS RevertDummy 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)









Else - Actions






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







If - Conditions








SS_Index Equal to 1







Then - Actions








Trigger - Turn on ShapeShift Loop <gen>







Else - Actions






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






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





Else - Actions
ShapeShift Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Game - Display to (All players) for 0.01 seconds the text: LOOP


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_AnimationGroup) Equal to False








SS_Command_Unit[SS_Loop] Not equal to No unit








(SS_Command_Unit[SS_Loop] is alive) Equal to True








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






Game - Display to (All players) for 0.01 seconds the text: CONDITIONS MET






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








Game - Display to (All players) for 0.01 seconds the text: ORGANIC LOOP








Set SS_Point[SS_Loop] = (Position of SS_ShapeShiftUnit[SS_Loop])








Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_Caster[SS_Loop]) degrees








Unit - Move SS_Command_Unit[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_Caster[SS_Loop]) degrees







Else - Actions








Game - Display to (All players) for 0.01 seconds the text: DESTRUCTIBLE LOOP








Set SS_Point[SS_Loop] = (Position of SS_Destructible[SS_Loop])








Unit - Move SS_Caster[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_Caster[SS_Loop]) degrees








Unit - Move SS_Command_Unit[SS_Loop] instantly to SS_Point[SS_Loop], facing (Facing of SS_Caster[SS_Loop]) degrees






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








Game - Display to (All players) for 0.01 seconds the text: (String(SS_StoredEXP[SS_Loop]))







Else - Actions






Custom script: call RemoveLocation (udg_SS_Point[udg_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_TempPoint[3] = (Position of 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








Destructible - Remove SS_Destructible[SS_Loop]








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






For each (Integer A) from 1 to 3, do (Actions)







Loop - Actions








Unit - Create 1 SS SmokeDummy for Neutral Passive at SS_TempPoint[3] facing Default building facing degrees








Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)






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_Command_Unit[SS_Loop]








Hero - Give (Last dropped item) to SS_Caster[SS_ItemLoop]








Set SS_ItemLoop = (SS_ItemLoop + 1)






Hero - Add SS_StoredEXP[SS_Loop] experience to SS_Caster[SS_Loop], Show level-up graphics






Custom script: call RemoveLocation (udg_SS_TempPoint[3])






Unit - Remove SS_Command_Unit[SS_Loop] from the game






Unit - Hide SS_Caster[SS_Loop]






Custom script: call UnitRemoveAbility (udg_SS_Caster[udg_SS_Loop],'Aloc')






Unit - Unhide SS_Caster[SS_Loop]






Unit - Add Crow Form to SS_Caster[SS_Index]






Animation - Change SS_Caster[SS_Loop] flying height to 0.00 at 0.00






Unit - Remove Crow Form from SS_Caster[SS_Index]






Selection - Select SS_Caster[SS_Loop] for (Owner of SS_Caster[SS_Loop])






Set SS_OriginalOwner[SS_Loop] = (Owner of No unit)






Set SS_TargetMana_C[SS_Loop] = 0.00






Set SS_TargetHp_C[SS_Loop] = 0.00






Set SS_UnitType_C[SS_Loop] = No unit-type






Set SS_DestructibleType_C[SS_Loop] = (Destructible-type of No destructible)






Set SS_OriginalOwner[SS_Loop] = SS_OriginalOwner[SS_Index]






Set SS_TargetMana_C[SS_Loop] = SS_TargetMana_C[SS_Index]






Set SS_TargetHp_C[SS_Loop] = SS_TargetHp_C[SS_Index]






Set SS_UnitType_C[SS_Loop] = SS_UnitType_C[SS_Index]






Set SS_OriginalEXP[SS_Loop] = 0






Set SS_OriginalEXP[SS_Loop] = SS_OriginalEXP[SS_Index]






Set SS_StoredEXP[SS_Loop] = 0






Set SS_StoredEXP[SS_Loop] = SS_StoredEXP[SS_Index]






Set SS_DestructibleType_C[SS_Loop] = SS_DestructibleType_C[SS_Index]






Set SS_Destructible[SS_Loop] = No destructible






Set SS_Command_Unit[SS_Loop] = No unit






Set SS_ShapeShiftUnit[SS_Loop] = No unit






Set SS_Caster[SS_Loop] = SS_Caster[SS_Index]






Set SS_Point[SS_Loop] = SS_Point[SS_Index]






Set SS_Destructible[SS_Loop] = SS_Destructible[SS_Index]






Set SS_Command_Unit[SS_Loop] = SS_Command_Unit[SS_Index]






Set SS_ShapeShiftUnit[SS_Loop] = SS_ShapeShiftUnit[SS_Index]






Set SS_Index = (SS_Index - 1)






Set SS_Loop = (SS_Loop - 1)






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







If - Conditions








SS_Index Equal to 0







Then - Actions








Game - Display to (All players) for 1.00 seconds the text: OFF








Trigger - Turn off ShapeShift Loop <gen>







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))




(Issued order) Equal to (Order(dropitem))

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






And - All (Conditions) are true







Conditions








(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






Set SS_OrderCheckerItem = (Target item of issued order)






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







If - Conditions








SS_OrderCheckerItem Not equal to No item







Then - Actions








Set SS_TempPoint[2] = (Position of SS_OrderCheckerItem)








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 150.00









Then - Actions










Hero - Give SS_OrderCheckerItem to SS_Command_Unit[SS_Loop]









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_OrderCheckerUnit = (Target unit of issued order)








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
ShapeShift Selection

Events


Player - Player 1 (Red) Deselects 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_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





Else - Actions






Selection - Select SS_Command_Unit[SS_Loop] for (Owner of SS_Caster[SS_Loop])
ShapeShift Revert Spell

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Stop Shape Shi|cffffcc00f|rt

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






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 - 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








Destructible - Remove SS_Destructible[SS_Loop]








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










Unit - Remove SS_ShapeShiftUnit[SS_Loop] from the game






For each (Integer A) from 1 to 3, do (Actions)







Loop - Actions








Unit - Create 1 SS SmokeDummy for Neutral Passive at SS_TempPoint[3] facing Default building facing degrees








Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)






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_Command_Unit[SS_Loop]








Hero - Give (Last dropped item) to SS_Caster[SS_ItemLoop]








Set SS_ItemLoop = (SS_ItemLoop + 1)






Hero - Add SS_StoredEXP[SS_Loop] experience to SS_Caster[SS_Loop], Show level-up graphics






Custom script: call RemoveLocation (udg_SS_TempPoint[3])






Unit - Remove SS_Command_Unit[SS_Loop] from the game






Unit - Hide SS_Caster[SS_Loop]






Custom script: call UnitRemoveAbility (udg_SS_Caster[udg_SS_Loop],'Aloc')






Unit - Unhide SS_Caster[SS_Loop]






Unit - Add Crow Form to SS_Caster[SS_Index]






Animation - Change SS_Caster[SS_Loop] flying height to 0.00 at 0.00






Unit - Remove Crow Form from SS_Caster[SS_Index]






Selection - Select SS_Caster[SS_Loop] for (Owner of SS_Caster[SS_Loop])






Set SS_Destructible[SS_Loop] = No destructible






Set SS_Command_Unit[SS_Loop] = No unit






Set SS_ShapeShiftUnit[SS_Loop] = No unit






Set SS_OriginalOwner[SS_Loop] = (Owner of No unit)






Set SS_TargetMana_C[SS_Loop] = 0.00






Set SS_TargetHp_C[SS_Loop] = 0.00






Set SS_UnitType_C[SS_Loop] = No unit-type






Set SS_DestructibleType_C[SS_Loop] = (Destructible-type of No destructible)






Set SS_OriginalEXP[SS_Loop] = 0






Set SS_OriginalEXP[SS_Loop] = SS_OriginalEXP[SS_Index]






Set SS_StoredEXP[SS_Loop] = 0






Set SS_StoredEXP[SS_Loop] = SS_StoredEXP[SS_Index]






Set SS_OriginalOwner[SS_Loop] = SS_OriginalOwner[SS_Index]






Set SS_TargetMana_C[SS_Loop] = SS_TargetMana_C[SS_Index]






Set SS_TargetHp_C[SS_Loop] = SS_TargetHp_C[SS_Index]






Set SS_UnitType_C[SS_Loop] = SS_UnitType_C[SS_Index]






Set SS_DestructibleType_C[SS_Loop] = SS_DestructibleType_C[SS_Index]






Set SS_Caster[SS_Loop] = SS_Caster[SS_Index]






Set SS_Point[SS_Loop] = SS_Point[SS_Index]






Set SS_Destructible[SS_Loop] = SS_Destructible[SS_Index]






Set SS_Command_Unit[SS_Loop] = SS_Command_Unit[SS_Index]






Set SS_ShapeShiftUnit[SS_Loop] = SS_ShapeShiftUnit[SS_Index]






Set SS_Index = (SS_Index - 1)






Set SS_Loop = (SS_Loop - 1)






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







If - Conditions








SS_Index Equal to 0







Then - Actions








Game - Display to (All players) for 1.00 seconds the text: OFF








Trigger - Turn off ShapeShift Loop <gen>







Else - Actions





Else - Actions
ShapeShift DropItemAbility

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Drop Item

Actions


Hero - Drop (Target item of ability being cast) from (Casting unit)

Dont give up man. Keep kicking like your avatar.![]()

WIP#2
I just feel like posting it.
Have fun..
I think it was said 'The spell should lead your enemy to wrong decisions.' or what do you mean ? It basically just has to make your enemy a wrong turn.Can someone please define the deception for this contest? Does it mean my spell has to do something else? Other than the main effect?
I would like to participate. Looking at other entries, mine would look weak. Please dont flame me for this.
Yes, the more the merrier.Hm, I think I participate with my idea I posted earlier, even if it is nothing great or unique.
So, my idea, the casting hero becomes invisible and 'all' orders being executed while he has the specific buff will create a dummy unit casting the ability instead, not having any actual effect.
I will see what exactly I am going to do, as there are some options I have to choose from and its extends. Posting a WIP soon.
@Empirean - Deception
Let's pretent you are the pro here. The way you have been pretending that you are not and asking about everything all around is THE perfect deception - because when it comes to serious thing, you would show who's the real pro here.
Get it?

True... he might join last minute and destroy us all.![]()
![]()
WIP meaning still in progress. you would be able to finish it in the last minute?Rules said:You must show at least one unfinished preview of your submission (Wip), before the deadline, as proof that it’s yours.
Why would anyone flame you for participating?
Eh, I hope I can solve my issues, the animation transfer between a caster and a dummy is quite challenging, though I have already an idea.Yes, the more the merrier.
Looking forward to it.
http://dictionary.reference.com/browse/deceive said:verb (used with object), deceived, deceiving.
1.
to mislead by a false appearance or statement; delude:
