• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Zephyr Contest #9 - Assassination

Status
Not open for further replies.
Level 16
Joined
Apr 4, 2011
Messages
995
Deceive
Background
This Spell is a representation of what i believe makes an Assassin an Assassin. His/her ability to deceive the enemy to get close enough to make the killing blow. The best Assassin is the one you least expect, one of your own. That is what my ability portrays, Disguising oneself as the enemy to take down your target.​
[r] [c]
  • Hashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------ --------
      • -------- Creates a Hashtable and sets a variable to it --------
      • -------- ------------------------------------------------------------------------------ --------
      • Hashtable - Create a hashtable
      • Set Deceive_HashTable = (Last created hashtable)
      • -------- ------------------------------------------------------------------------------ --------
  • Deceive Break
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Decieve ) Equal to True
      • ((Triggering unit) is A Hero) Equal to False
      • (Level of (Triggering unit)) Less than 5
      • ((Triggering unit) is Mechanical) Equal to False
    • Actions
      • -------- -------------------------------------------------------------------- --------
      • -------- After the spell is cast, and a unit is attacked. --------
      • -------- -------------------------------------------------------------------- --------
      • -------- Setting the Point for the Dummy Unit --------
      • Set Guise_Controller_Point = (Position of (Triggering unit))
      • -------- Creating a dummy unit and changing its speed so it doesn't lose pace with the target --------
      • Unit - Create 1 Unit Controller for (Owner of (Attacking unit)) at Guise_Controller_Point facing Default building facing degrees
      • Unit - Set (Last created unit) movement speed to (Default movement speed of (Triggering unit))
      • -------- Removing the Assassin and selecting the dummy unit --------
      • Unit - Remove (Attacking unit) from the game
      • Selection - Add (Last created unit) to selection
      • -------- Custom script that retreives the handle of the dummy unit created --------
      • Custom script: set udg_Deceive_Key = GetHandleId(bj_lastCreatedUnit)
      • -------- The dummy unit being added to the group, and then selected, and set to a variable. --------
      • Unit Group - Add (Last created unit) to Deceive_DummyGroup
      • Unit Group - Pick every unit in Deceive_DummyGroup and do (Actions)
        • Loop - Actions
          • Set Deceive_Dummy = (Picked unit)
      • -------- Saving the target unit for later use --------
      • Hashtable - Save Handle Of(Triggering unit) as 0 of Deceive_Key in Deceive_HashTable
      • -------- Cleaning up the Location Leak --------
      • Custom script: call RemoveLocation(udg_Guise_Controller_Point)
      • -------- -------------------------------------------------------------------- --------
      • -------- -------------------------------------------------------------------- --------
  • Controller Move
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Triggering unit) Equal to Deceive_Dummy
    • Actions
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- When you select to move with the Dummy Unit this trigger orders the Target Unit to move to that same spot --------
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- A Temporary location is set so that it does not leak --------
      • Set Deceive_Temploc = (Target point of issued order)
      • -------- Ordering the Target Unit defined in the hashtable to move to the location moved to by the Dummy Unit --------
      • Unit - Order (Load 0 of Deceive_Key in Deceive_HashTable) to Move To Deceive_Temploc
      • -------- Cleaning up the Location Leak --------
      • Custom script: call RemoveLocation(udg_Deceive_Temploc)
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
  • Assassinate Cast
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Deceive_Dummy
    • Actions
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- After attacking an enemy with the Dummy Unit, this will order the Target Unit to attack aswell as stopping the Dummy Unit from doing any damage --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- The Stop Order to the Dummy Unit --------
      • Unit - Order (Attacking unit) to Stop
      • -------- The Attack order to the Target Unit --------
      • Unit - Order (Load 0 of Deceive_Key in Deceive_HashTable) to Attack (Triggering unit)
      • -------- A Boolean to ensure the attack command was made by the caster of Deceive, and not of the command from the enemy --------
      • Hashtable - Save True as 1 of Deceive_Key in Deceive_HashTable
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
  • Assassinate Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to (Load 0 of Deceive_Key in Deceive_HashTable)
      • (Load 1 of Deceive_Key from Deceive_HashTable) Equal to True
    • Actions
      • -------- -------------------------------------------------------------------------------- --------
      • -------- The damage calculations to the Assassinated unit. --------
      • -------- -------------------------------------------------------------------------------- --------
      • -------- Setting a Temporary Location, and the facing angles of the two units. --------
      • Set Deceive_Temploc2 = (Position of (Attacking unit))
      • Set Assassinate_AngleOfAttack = (Facing of (Attacking unit))
      • Set Assassinate_AngleOfAttacked = (Facing of (Triggering unit))
      • -------- Checking if the unit is facing away from the other unit --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Assassinate_AngleOfAttacked - Assassinate_AngleOfAttack) Less than or equal to 90.00
              • (Assassinate_AngleOfAttacked - Assassinate_AngleOfAttack) Greater than or equal to 270.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is A Hero) Equal to True
            • Then - Actions
              • -------- Edit Full damage to heroes --------
              • Unit - Cause Deceive_Dummy to damage (Triggering unit), dealing 300.00 damage of attack type Normal and damage type Normal
            • Else - Actions
              • -------- Edit Kill or Full Damage to units --------
              • Unit - Kill (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is A Hero) Equal to True
            • Then - Actions
              • -------- Edit Half Damage to heroes --------
              • Unit - Cause Deceive_Dummy to damage (Triggering unit), dealing 100.00 damage of attack type Normal and damage type Normal
            • Else - Actions
              • -------- Edit Half Damage to units --------
              • Unit - Cause Deceive_Dummy to damage (Triggering unit), dealing 300.00 damage of attack type Normal and damage type Normal
      • -------- ---------------------------------------------------- --------
      • -------- The Assassin returns to the map --------
      • -------- ---------------------------------------------------- --------
      • Unit - Create 1 Assassin for (Owner of Deceive_Dummy) at Deceive_Temploc2 facing Default building facing degrees
      • Unit - Remove (Attacking unit) from the game
      • Unit - Remove Deceive_Dummy from the game
      • Unit - Remove Deceive from (Last created unit)
      • -------- Adding a Dummy Spell --------
      • Unit - Add Deceive [Unuseable] to (Last created unit)
      • Hashtable - Save Handle Of(Last created unit) as 2 of Deceive_Key in Deceive_HashTable
      • -------- Edit Duration of Out Of Combat timer --------
      • Set Deceive_OutOfCombat = 5.00
      • Hashtable - Save Deceive_OutOfCombat as 3 of Deceive_Key in Deceive_HashTable
      • Trigger - Turn on Out Of Combat Timer <gen>
      • -------- Cleaning up Location Leaks --------
      • Custom script: call RemoveLocation(udg_Deceive_Temploc2)
      • -------- ---------------------------------------------------- --------
      • -------- ---------------------------------------------------- --------
  • Out Of Combat Timer
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- --------------------------------------------------------------------------------------------- --------
      • -------- The timer for the Assassin to be able to cast Deceive again --------
      • -------- --------------------------------------------------------------------------------------------- --------
      • Set Deceive_OutOfCombat = (Load 3 of Deceive_Key from Deceive_HashTable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Deceive_OutOfCombat Greater than 0.00
        • Then - Actions
          • -------- Counting down on the timer --------
          • Hashtable - Save (Deceive_OutOfCombat - 0.03) as 3 of Deceive_Key in Deceive_HashTable
        • Else - Actions
          • -------- Replacing the Dummy Spell with the Real Spell --------
          • Unit - Remove Deceive [Unuseable] from (Load 2 of Deceive_Key in Deceive_HashTable)
          • Unit - Add Deceive to (Load 2 of Deceive_Key in Deceive_HashTable)
      • -------- --------------------------------------------------------------------------------------------- --------
      • -------- --------------------------------------------------------------------------------------------- --------
  • In Combat Reset
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to (Load 2 of Deceive_Key in Deceive_HashTable)
    • Actions
      • -------- ------------------------------------------------------------------------------ --------
      • -------- Reseting the Out Of Combat Timer when attacked --------
      • -------- ------------------------------------------------------------------------------ --------
      • -------- Edit Duration of Out Of Combat Reset --------
      • Set Deceive_OutOfCombat = 5.00
      • Hashtable - Save Deceive_OutOfCombat as 3 of Deceive_Key in Deceive_HashTable
      • -------- ------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------ --------
[c]

Credits to: Defskull and spartipilo for helping me out with Hashtables, Thanks!

Now that it's readable, here are the problems.

You rely on A Unit Is Attacked. That is a terrible event as it is abusable.

You have a lot of times you could store units into variables to make calling them far more efficient

You also have 4 "A Unit Is Attacked" events. Combine them into one using if/then/else statements, because every single time any unit in your map is bieng attacked it will run 4 different checks when it should run a single check. Also make sure you turn that event on and off, same with the loop.
 
Level 17
Joined
Jun 17, 2010
Messages
2,275
Yes i see that i can compress them together, when making separate triggers to make a spell work you don't think about it until once it is all done. But the nature of the Unit Is attacked makes them unabusable.
1. ) Wind Walk is a very unique spell, since it breaks on attack, and since i have a condition that states the buff is required for the trigger to run, that cannot be abused.
2. ) The Dummy Unit doesn't do damage at all, it is ordered to stop as soon as the attack happens, so it cannot be abused, constantly attacking will just constantly cause the dummy unit to stop.
3. ) This is an Enemy unit attacking one of its own. It cannot be abused because i have a Boolean that makes sure the Caster has ordered the Target to attack, and you can only command the attack to happen in 1 instance since the unit is removed right after the attack has taken place.
4. ) There is no way that can be abused, it is just reseting the timer for the Assassin to be out of combat, if an enemy attacks him then it resets, It cannot be abused because if you are in range to A + S; A + S; etc. then you are not out of combat.
 
I'M EGG INTOLERANT.

edit
Better get started with this.

edit


This is all I have.
Am I forgetting anything?
If so, contact me.

edit
This is how I'm going to judge your entries:

  • Concept (10)
    • Creative (5)
    • Unique (5)
  • Coding (20)
    • MUI + Leakless (8)
    • Bugless (5)
    • Efficient (5)
    • Documentation + Comments (2)
  • Visuals (10)
    • Relevant-to-Theme Effects (4)
    • Quality of Tooltips (3)
    • Quantity of Effects (3)
 
Last edited:
Nah, the Concept and Visuals fields will boost your score, and when I reject a spell in the spells in the spells section, it's because it doesn't have what I could classify as 16/20+ in the coding field xD
Hive has standards, and I want people to try their best to meet them.

By 16/20, I mean:

MUI + Leakless (8/8)
Bugless (5/5)
Efficient (3/5)
Documentation + Comments (0/2)

And that's like the minimal requirement.

It has to be MUI/Leakless, so we arrive at 8. It has to have no bugs, hence, 13.
It has to be somewhat efficient, so 16. I /can/ approve something with 0 comments or documentation, so we remain at 16.
 
Status
Not open for further replies.
Top