Spasm.2 [Spell]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Here is my spell for Zephyr Contest #9 ~ Assassination
Thought I'll actually submit something here for once.
Also the first spell that I have done intentionally not for one of my maps.

Teleports you in a very short distance, stunning enemies around the casting unit for a very short time and creating an illusion of anything close to it, resulting in the effected unit(s) attacking a random one within 130 range of it. Also takes a slight amount of damage.
Level 1 - 30 damage, 160 AOE and 300 range.
Cost 80 mana, 4.00 seconds cooldown.
Level 2 - 65 damage, 200 AOE and 425 range.
Cost 55 mana, 3.25 seconds cooldown.
Level 3 - 100 damage, 240 AOE and 550 range.
Cost 30 mana, 2.50 seconds cooldown.
Due to the dummy spell(Thunder Clap) I am using for this spell
it has a .33 second (or close enough to) time to actually cast fully
the whole spell making me have resort to having to delay the whole
spell to take .33 seconds to cast the entire spell(which worker out
well in the end anyway).

Anyway for this to actualy work I needed to be able to create a
dummy unit that uses the edited spell of Thunder Clap right away
at the targeted area when you use the whole spell 'Spasm'.
  • Cast Spasm
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Spasm
    • Actions
      • -------- Sets up a Point so it doesn't leak --------
      • Set Point = (Target point of ability being cast)
      • -------- Adds the casting units owner to a group that will take effect in the trigger 'Transparency' --------
      • Player Group - Add (Triggering player) to CastingPlayers
      • -------- Setting this variable up will allow more efficient and easy use for multiple uses in this strait forward trigger. --------
      • Set IntegerSetup = (Player number of (Triggering player))
      • -------- Sets up a unit group variable for use of transparency(special effect) --------
      • Set EffectedUnits[IntegerSetup] = (Units within (((Real((Level of Spasm for (Triggering unit)))) x 40.00) + 120.00) of Point matching ((Owner of (Matching unit)) Not equal to (Triggering player)))
      • -------- Where the stunning effect takes place --------
      • Unit - Create 1 Slow Dummy for (Triggering player) at Point facing 0.00 degrees
      • Unit - Set level of Spell Slow/Stun for (Last created unit) to (Level of Spasm for (Triggering unit))
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • -------- Resets addition --------
      • -------- From use in the trigger 'Transparency'. --------
      • Set Addition[IntegerSetup] = True
      • -------- Turns on the trigger Transparency for use(Note: Read Transparency Trigger trigger comment) --------
      • Trigger - Turn on Transparency <gen>
      • -------- Removes the set up leak --------
      • Custom script: call RemoveLocation(udg_Point)
      • -------- This will queue how many times this spell is currently being used at once. --------
      • Set DummyUses = (DummyUses + 1)
      • Trigger - Turn on Remove Dummy <gen>
This spell was made to be able to turn off when finished
so that when it isn't needed it won't clash and take any
efficiency when a unit finishes casting a spell.

In other words if this trigger isn't to be turned of in a
real map with lots of spell able to be used, every time
one of those spells finishes casting this spell will be
pointlessly triggering taking up meaningless processing.
'Initially off'
  • Remove Dummy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Spell Slow/Stun
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Set DummyUses = (DummyUses - 1)
      • -------- Read Trigger Comment --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DummyUses Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
I have figured a formula out myself so that a looping trigger like this one
will not be kept on(turned off) when it is not being used for MUI triggers.
This is made for only one unit at a time for each player to have this spell available!
Don't really remember ever seeing it used by someone else.
----
It uses a basic function of when the trigger triggers a boolean
is set to False(/True).

If conditions are met with a player or unit
still being in play of using this trigger the boolean will be set to
True(/False).

If no other players/units are triggering
this trigger the boolean will be left as False(/True)

If the trigger is met as being useless it will be turned off.
In this case it will check if the set boolean is False(/True)
and if it is False(/True) the triggering trigger will be
turned off.
-----------------------------------------
Set OnCheck = False
-
if - Conditions
Main Trigger conditions function
Then - Actions
Set OnCheck = True
-
If - Conditions
OnCheck Equal to False
Then - Actions
Trigger - Turn off (This trigger)
-----------------------------------------
'Initially off'
  • Transparency
    • Events
      • Time - Every 0.12 seconds of game time
    • Conditions
    • Actions
      • -------- 'Check Trigger Comment' --------
      • Set OnCheck = False
      • Player Group - Pick every player in CastingPlayers and do (Actions)
        • Loop - Actions
          • Set OnCheck = True
          • Set IntegerSetup = (Player number of (Picked player))
          • -------- Needs to add to itself to gain transparecy --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Addition[IntegerSetup] Equal to True
            • Then - Actions
              • Set Transparency[IntegerSetup] = (Transparency[IntegerSetup] + 11.11)
              • -------- This is the next action taken when the effected units hit max transparency and from when the start changing to be visible again. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Transparency[IntegerSetup] Equal to 111.10
                • Then - Actions
                  • Set Addition[IntegerSetup] = False
                  • Set Transparency[IntegerSetup] = (Transparency[IntegerSetup] - 11.11)
                  • -------- This is when all the targeted units are ordered to attack random ones. --------
                  • Unit Group - Pick every unit in EffectedUnits[IntegerSetup] and do (Actions)
                    • Loop - Actions
                      • Set Point = (Position of (Picked unit))
                      • Custom script: set bj_wantDestroyGroup = true
                      • -------- Considering how messed up this function can be I have made it so that the effected units attack random units that arn't owned by the owner of the casting units --------
                      • -------- Even though the effected units arn't ordered to attack the units owned by the casting unit they will still get targeted in the end. --------
                      • Unit - Order (Picked unit) to Attack (Random unit from (Units within 140.00 of Point matching ((Owner of (Matching unit)) Not equal to (Picked player))))
                      • Custom script: call RemoveLocation(udg_Point)
                • Else - Actions
            • Else - Actions
              • -------- When the variable 'Addition' is set to false the effected units regain thier transparency --------
              • Set Transparency[IntegerSetup] = (Transparency[IntegerSetup] - 11.11)
              • -------- This is when the spell is finished --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Transparency[IntegerSetup] Equal to 0.00
                • Then - Actions
                  • Player Group - Remove (Picked player) from CastingPlayers
                  • Custom script: call DestroyGroup(udg_EffectedUnits[udg_IntegerSetup])
                • Else - Actions
              • -------- -- --------
          • -------- This is where all the units in the targeted area gains an over time transparence --------
          • Unit Group - Pick every unit in EffectedUnits[IntegerSetup] and do (Actions)
            • Loop - Actions
              • Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with Transparency[IntegerSetup]% transparency
      • -------- This functions when the trigger is no longer being used. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OnCheck Equal to False
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
Latest updates.
  • Merged Casting triggers.
  • Fixed some spelling errors in the trigger comments.

Keywords:
Spasm, Spell, Blink, Confusion, Cockiness, Dust, Fizzle, Gas, Assassin, Assassination, Teleport, Short
Contents

Assassin spell (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 23:22, 22nd Aug 2012 Magtheridon96: Just a quick review: - All speeds must be MUI and MPI, not just one. - Instead of repeating function calls like (Owner of blabla), (Picked unit)...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

23:22, 22nd Aug 2012
Magtheridon96:

Just a quick review:

- All speeds must be MUI and MPI, not just one.
- Instead of repeating function calls like (Owner of blabla), (Picked unit), (Triggering unit), etc..., store them into variables and use those.
- You have a group leak inside the loop trigger when you're getting a random unit. You should set bj_wantDestroyGroup to true right before you get the random unit.
- The "Random unit in (group)" action in GUI is a load of baloney. You can simply just set the unit the variable to FirstOfGroup(udg_yourGroup)
- That 11.11 should be configurable somewhere.

That's all I guess.
 
I get the feeling it's only MPI, but it could just be my imagination, I'll have to test that. Though I would like to point out "begins casting an ability" shouldn't be used, it -can- if I remember correctly by abused.

Edit: Well yes it's abusable but it seems MUI, that or I can't cast two spells close enough in time as a single player to be able to cause a bug, as it is you can cast the spell without putting it on cooldown by stopping the spell after casting it (if you time it correctly)

Other notes: You need a configuration for this spell, having everything as a constant inside the spell isn't exactly the best of things to have.

Your attack orders I should think are relatively pointless, wouldn't they just retarget on their own? Think this also breaks the authenticity rule by not registering the actual damage source, correcting it is fairly simple, you just do the damage with the triggers, and use the object editor spell to put the stun on only and not deal the damage. really I don't quite follow the point of the loop, it doesn't exactly do anything which effects the game, it's just a whole trigger to make some pretty effects go off, this spell would function the same with or without that
 
The spell is meant to be used for one hero per player in a desired game.
Any useful criticism would be appreciated.

Edit: Wait... Why didn't I merge the two casting triggers. I'll do that right away.

Your attack orders I should think are relatively pointless, wouldn't they just retarget on their own?
This spell could be useful for maybe rpgs, AIs or just to confuse the opponent.
really I don't quite follow the point of the loop, it doesn't exactly do anything which effects the game, it's just a whole trigger to make some pretty effects go off, this spell would function the same with or without that
Just special effects to add to the spell.

Edit2: updated

use the object editor spell to put the stun on only and not deal the damage.
What would be the point in this exactly?
 
Last edited:
This spell could be useful for maybe rpgs, AIs or just to confuse the opponent.
Just special effects to add to the spell.

Well it wouldn't really confuse the opponent, they'd retarget on their own, as would well programmed AIs even if you did make them attack other units, Rpgs? Maybe, but what if the new selected target is behind a wall which it cannot get to? it'll try to get to it, but never succeed, not to meantion target structures or units it can't actually attack at all.

DeathChef said:
What would be the point in this exactly?

So it could be configurable, So that the damage source is recognised, that kind of thing
 
Top