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

Zephyr Contest #13 - Deception

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
I guess you didnt understand what I said about configurables after al TC...
Shall I give you another 432 more configurables in your spell?

I think I will join with my wild card.
It is a bit of a minigame which is also a nice theme for such a competition.

Description:
House of Mirrors
<name> challanges the target enemy hero into a duel of deception.
Both heroes are invulnerable, silenced and blind for the entire duration of House of Mirrors.
<name> will create a clone of himself and surround the enemy hero.
Within 3 seconds, he can choose his location and the clone will appear on the other side of the hero.
The enemy hero has 4 seconds to attack one unit.
If he attacks the clone, <name> stacks up <amount> damage.
If he attacks <name>, another clone will spawn.
After 6 rounds, the enemy hero will take spell damage equal to the stacked amount.

Dont mind about the <name> and <amount> :D

To explain a bit how it goes:
You will create a clone and make the enemy hero attack either one of them.
When he attacks a clone, he takes damage, but when he attacks the hero, another clone will spawn making the next round be harder.
Ofcourse this only works in PvP, but lets face it... deception vs AI?

(This spell is designed for AoS/RPG maps and not for RTS maps so consider the enemy hero to not have any other units at all.)
 
Level 10
Joined
Apr 4, 2010
Messages
509
WIP First Half

  • 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
 
Level 10
Joined
Apr 4, 2010
Messages
509
2nd WIP Entry

Not too sure on the name anymore, it might grow on me though.
  • 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
 
JASS:
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

I simple WIP i made today. I'm still currently programming in Assembly 8086 and i just got bored so made the wip.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
I will just post my spell concept here to tell other that I have already used that idea. I haven't really re-phrase much of the concept but here is the idea:

Panda will summon three Elemental Body (Storm, Earth and Fire) but Panda's Soul is initially within one of the three elemental body. Panda can transfer his spirit from one elemental body to another transferring his current mana (but not HP). Elemental Bodies without Panda's soul cannot cast spell.
When an elemental body without Panda's soul takes damage, it will store the source and the total amount of damage taken from that specific unit. When that elemental body dies (without Panda's soul), it will return all damage instance stored (configurable scaling). When an elemental body with Panda's soul dies, all elemental bodies will die and damage will not be returned.

So the deception here is, your enemies will be confused whether they should attack an elemental body or not because it may backfire to them. Trick your foes into thinking that a certain elemental body has Panda's soul when it really isn't and watch them kill themselves. Oh and elemental bodies without Panda's soul appears bluish to you and your ally like an illusion.

Some WIP, I haven't got the time to transform it into a library with required systems:

JASS:
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
 
Level 10
Joined
Apr 4, 2010
Messages
509
3rd WIP Entry

  • 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)
1.png2.png
Now I know why people hate GUI. I spent hours trying to figure out a bug, now I have to take some steps back. :ogre_rage:
 
I would like to participate. Looking at other entries, mine would look weak. Please dont flame me for this. My ability concept is like this: The caster instantly turns into a hay-stack and moves backwards. Enemies near the caster will be forced to attack the hay stack and have their armors reduced for a duration. Old school ninja skill. I hope this is acceptable. Please someone tell me if its acceptable.
 

Ardenian

A

Ardenian

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.
 

Ardenian

A

Ardenian

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 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.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
There are two kinds of deception:
1, Make the other believe something that isn't true.
2, Make the other do something that he didn't want to do (not against his will but like that he finds out that he shouldn't have done that after he did it).

There is really no other kind of deception that you can think of.
You could try to classify your spell in either of these two types.
(Taunt for example does force your opponent to attack you but that is against his will so is not deception. So your spell is not really a Deception spell I guess.)

Judges can correct me if they find another kind of deception that I cannot think of after 3 weeks of trying to find the root concept of deception. :D
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
I would like to participate. Looking at other entries, mine would look weak. Please dont flame me for this.

Why would anyone flame you for participating?


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.
Yes, the more the merrier.
Looking forward to it.

@Weitlol, after reading your concept idea entry, I realize we almost have the same concept or not?
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,658
@Shadow Flux
Yes the concept is kind of the same... however you make your opponent to always choose the wrong choice if you can switch between the clones fast enough.
It is kind of an unfair concept in that case.
The other difference is that mine is based on just the idea of who is the real one and who is the clone.
It is like a minigame instead of a more counterplay.

also
Do the rules say when the WIP must be shown?
You can upload a WIP and final work in the last minute of the contest afaik.
 
I'd advice anyone who does have some time to spare to play with WEditor and join the contest. Personaly, I had a lot of fun participating in those, even though most of the time I was finishing my entries very late (even when I thought I had lots of time left).

So, instead of asking yourself "should I join?", rephrase the question to "what I can surprice people with?".
 
Finally i have thought of something. The concept is, the hero marks the target with a curse or something. At a certain delay the curse will explode damaging the area where the marked unit is currently located. The center of the location of the unit is a safe spot. Standing still allows the target to take no damage. The deception is when the unit runs away, if he moves out of the safe spot he and allies near his location will be damaged. The spell has no name yet but ill try not name it as curse of something. Very simple spell idea yes. This shall be my entry.
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
Deception is tricking/misleading the opponent, making him/her fooled in some way.

I don't see how your spell does that. 'Mirror Image' is a perfect spell example.

edit:
http://dictionary.reference.com/browse/deceive said:
verb (used with object), deceived, deceiving.
1.
to mislead by a false appearance or statement; delude:
 
I think it may still work - it would be reliant on how twitchy the opponent is i.e. the deception would be playing on the base assumption of how most other abilities function and conversely may be able to train your opponent into not dodging allowing you to hit them with other (more damaging) abilities. So I think the concept is valid though may want a delivery projectile and not tie it directly to a unit - rather places a curse on the ground and to avoid damage enemies move into it rather than away
 
Status
Not open for further replies.
Top