• 🏆 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!

Vae Victis v1.5

This Spell was a request by Misha. It is my very first fully-MUI spell so if I made any mistakes in efficiency let me know.

The spell -

Thrusts Arthas' sword into a target unit, draining its health and mana over a few seconds. The drained health and mana will be transferred to Arthas.

Level 1|r - 15% of target's max health/mana drained over 3 seconds.
Level 2|r - 30% of target's max health/mana drained over 4 seconds.
Level 3|r - 45% of target's max health/mana drained over 5 seconds.

It's pretty simple, so maybe not useful to all, but Misha wanted me to upload it because he wants it to be approved before he uses it.

I have to give credit to Deuterium for his Essentials Tutorial which finally made me understand MUI.

The icon I used for the spell is my own and can be found here:
http://www.hiveworkshop.com/forums/icons-541/btnenchantweaponred-137512/?prev=search%3Dred%2520sword%26d%3Dlist%26r%3D20

  • Vae Victis Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vae Victis
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VV_index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on Vae Victis Per <gen>
        • Else - Actions
      • Set VV_index1 = (VV_index1 + 1)
      • Set VV_index2 = (VV_index2 + 1)
      • Set VV_loop_boolean[VV_index2] = True
      • Set VV_caster[VV_index2] = (Triggering unit)
      • Set VV_target[VV_index2] = (Target unit of ability being cast)
  • Vae Victis Per
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer VV_index3) from 1 to VV_index2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • VV_loop_boolean[VV_index3] Equal to True
            • Then - Actions
              • Set VV_counter[VV_index3] = (VV_counter[VV_index3] + 0.05)
              • -------- -------------------------------------------------------------------------------- --------
              • -------- This set of variables will determine the % of health/mana drained. --------
              • -------- -------------------------------------------------------------------------------- --------
              • Set VV_initialRL[VV_index3] = ((Max life of VV_target[VV_index3]) x (0.15 x (Real((Level of Vae Victis for VV_caster[VV_index3])))))
              • Set VV_finalRL[VV_index3] = (VV_initialRL[VV_index3] / (2.00 + (Real((Level of Vae Victis for VV_caster[VV_index3])))))
              • Set VV_initialRM[VV_index3] = ((Max mana of VV_target[VV_index3]) x (0.15 x (Real((Level of Vae Victis for VV_caster[VV_index3])))))
              • Set VV_finalRM[VV_index3] = (VV_initialRM[VV_index3] / (2.00 + (Real((Level of Vae Victis for VV_caster[VV_index3])))))
              • -------- -------------------------------------------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VV_counter[VV_index3] Equal to 0.15
                • Then - Actions
                  • Unit - Pause VV_caster[VV_index3]
                  • Unit - Pause VV_target[VV_index3]
                  • Animation - Change VV_caster[VV_index3]'s animation speed to 0.00% of its original speed
                  • Animation - Change VV_target[VV_index3]'s animation speed to 0.00% of its original speed
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VV_counter[VV_index3] Equal to 1.00
                • Then - Actions
                  • Unit - Cause VV_caster[VV_index3] to damage VV_target[VV_index3], dealing VV_finalRL[VV_index3] damage of attack type Chaos and damage type Normal
                  • Unit - Set mana of VV_target[VV_index3] to ((Mana of VV_target[VV_index3]) - VV_finalRM[VV_index3])
                  • Unit - Set life of VV_caster[VV_index3] to ((Life of VV_caster[VV_index3]) + VV_finalRL[VV_index3])
                  • Unit - Set mana of VV_caster[VV_index3] to ((Mana of VV_caster[VV_index3]) + VV_finalRM[VV_index3])
                  • Special Effect - Create a special effect attached to the chest of VV_target[VV_index3] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodRifleman.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the weapon of VV_caster[VV_index3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VV_counter[VV_index3] Equal to 2.00
                • Then - Actions
                  • Unit - Cause VV_caster[VV_index3] to damage VV_target[VV_index3], dealing VV_finalRL[VV_index3] damage of attack type Chaos and damage type Normal
                  • Unit - Set mana of VV_target[VV_index3] to ((Mana of VV_target[VV_index3]) - VV_finalRM[VV_index3])
                  • Unit - Set life of VV_caster[VV_index3] to ((Life of VV_caster[VV_index3]) + VV_finalRL[VV_index3])
                  • Unit - Set mana of VV_caster[VV_index3] to ((Mana of VV_caster[VV_index3]) + VV_finalRM[VV_index3])
                  • Special Effect - Create a special effect attached to the chest of VV_target[VV_index3] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodRifleman.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the weapon of VV_caster[VV_index3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VV_counter[VV_index3] Equal to 3.00
                • Then - Actions
                  • Unit - Cause VV_caster[VV_index3] to damage VV_target[VV_index3], dealing VV_finalRL[VV_index3] damage of attack type Chaos and damage type Normal
                  • Unit - Set mana of VV_target[VV_index3] to ((Mana of VV_target[VV_index3]) - VV_finalRM[VV_index3])
                  • Unit - Set life of VV_caster[VV_index3] to ((Life of VV_caster[VV_index3]) + VV_finalRL[VV_index3])
                  • Unit - Set mana of VV_caster[VV_index3] to ((Mana of VV_caster[VV_index3]) + VV_finalRM[VV_index3])
                  • Special Effect - Create a special effect attached to the chest of VV_target[VV_index3] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodRifleman.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the weapon of VV_caster[VV_index3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Vae Victis for VV_caster[VV_index3]) Equal to 1
                    • Then - Actions
                      • Unit - Unpause VV_caster[VV_index3]
                      • Unit - Unpause VV_target[VV_index3]
                      • Animation - Change VV_caster[VV_index3]'s animation speed to 100.00% of its original speed
                      • Animation - Change VV_target[VV_index3]'s animation speed to 100.00% of its original speed
                      • Set VV_counter[VV_index3] = 0.00
                      • Set VV_index1 = (VV_index1 - 1)
                      • Set VV_loop_boolean[VV_index3] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • VV_index1 Equal to 0
                        • Then - Actions
                          • Set VV_index2 = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VV_counter[VV_index3] Equal to 4.00
                • Then - Actions
                  • Unit - Cause VV_caster[VV_index3] to damage VV_target[VV_index3], dealing VV_finalRL[VV_index3] damage of attack type Chaos and damage type Normal
                  • Unit - Set mana of VV_target[VV_index3] to ((Mana of VV_target[VV_index3]) - VV_finalRM[VV_index3])
                  • Unit - Set life of VV_caster[VV_index3] to ((Life of VV_caster[VV_index3]) + VV_finalRL[VV_index3])
                  • Unit - Set mana of VV_caster[VV_index3] to ((Mana of VV_caster[VV_index3]) + VV_finalRM[VV_index3])
                  • Special Effect - Create a special effect attached to the chest of VV_target[VV_index3] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodRifleman.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the weapon of VV_caster[VV_index3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Vae Victis for VV_caster[VV_index3]) Equal to 2
                    • Then - Actions
                      • Unit - Unpause VV_caster[VV_index3]
                      • Unit - Unpause VV_target[VV_index3]
                      • Animation - Change VV_caster[VV_index3]'s animation speed to 100.00% of its original speed
                      • Animation - Change VV_target[VV_index3]'s animation speed to 100.00% of its original speed
                      • Set VV_counter[VV_index3] = 0.00
                      • Set VV_index1 = (VV_index1 - 1)
                      • Set VV_loop_boolean[VV_index3] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • VV_index1 Equal to 0
                        • Then - Actions
                          • Set VV_index2 = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VV_counter[VV_index3] Equal to 5.00
                • Then - Actions
                  • Unit - Cause VV_caster[VV_index3] to damage VV_target[VV_index3], dealing VV_finalRL[VV_index3] damage of attack type Chaos and damage type Normal
                  • Unit - Set mana of VV_target[VV_index3] to ((Mana of VV_target[VV_index3]) - VV_finalRM[VV_index3])
                  • Unit - Set life of VV_caster[VV_index3] to ((Life of VV_caster[VV_index3]) + VV_finalRL[VV_index3])
                  • Unit - Set mana of VV_caster[VV_index3] to ((Mana of VV_caster[VV_index3]) + VV_finalRM[VV_index3])
                  • Special Effect - Create a special effect attached to the chest of VV_target[VV_index3] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodRifleman.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the weapon of VV_caster[VV_index3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Unpause VV_caster[VV_index3]
                  • Unit - Unpause VV_target[VV_index3]
                  • Animation - Change VV_caster[VV_index3]'s animation speed to 100.00% of its original speed
                  • Animation - Change VV_target[VV_index3]'s animation speed to 100.00% of its original speed
                  • Set VV_counter[VV_index3] = 0.00
                  • Set VV_index1 = (VV_index1 - 1)
                  • Set VV_loop_boolean[VV_index3] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • VV_index1 Equal to 0
                    • Then - Actions
                      • Set VV_index2 = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
UPDATE: The caster and target no longer turn red. Added an extra effect to the blade.
UPDATE2: Fixed a tooltip mistake.
UPDATE3: Altered the mechanics of the drain, fixed the static array indexes to be more efficient (thanks to DSG and Deuterium) and added code in description.
UPDATE4: Fixed animation and timing problems.
UPDATE5: Removed custom icon for skill.

Keywords:
Vae, Victis, Kain, Demon, Drain
Contents

Vae Victis (Map)

Reviews
11:12, 2nd Mar 2010 TriggerHappy: Coding seemed fine and the effect was decent. Good tooltip too.

Moderator

M

Moderator

11:12, 2nd Mar 2010
TriggerHappy:

Coding seemed fine and the effect was decent. Good tooltip too.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
Why the hell are you using static array indexes?
Much rather make dedicated variables as they are faster and more efficent than static array indexes.

I would like to remind you array indexies are ment for use mathimatically for some form of variable data retrevial. Retreving them in a static or constant manner completly kills the point of using an array, and in that case you should default to non array variables (which retain the functionalty in a more efficent way).
 
Level 12
Joined
Jun 28, 2008
Messages
688
Oh man. I was afraid someone was gonna bust me for something I have no clue I did.

I literally just took a step up from using Waits and having absolutely no MUI periodic spells... so I have no clue what a static array index is or what dedicated variables are, sorry. I just followed the MUI section in Deuterium's Essentials Tutorial, not to put blame on him.
 
Level 17
Joined
Mar 17, 2009
Messages
1,349
The thing DSG mentioned was my fault... sorry. Yet I updated my tutorial to correct that.

@ StaberFire:
To fix the issue DSG mentioned, you know how we used Index[1] and Index[2] and Index[3]? Well that works and has no bugs... so you don't really need to change it.

But if you want more efficiency, instead of using the arrayed variable Index, make 3 separate non-arrayed variables: Index[1] becomes Index1, Index[2] becomes Index2, Index[3] becomes Index3...

As simple as that :)

Sorry again ;)
 
Level 9
Joined
Nov 25, 2008
Messages
194
hmm.. saw the spell ingame and i think 3 levels should be good. dunno why you people put four levels Oo

and the rate/amount of mana/life sapping should be greater at start, and proceed to be greater
maybe just adding one more "sap" with each level to the spell?

WHy they have 4 levels?

DotA

Spells sound a bit overpowered 40% over 3 sec Oo
 
Level 12
Joined
Jun 28, 2008
Messages
688
Thanks Deuterium, I'll update the spell right away. Misha that effect is still there, it's just the Vampiric Potion caster effect.

And I think I know what you mean by making it more powerful, but just to be clear:

You want it to start at a greater % and instead of adding % per level, you want to add another second to sap per level?

EDIT: And I didn't put four level because of DotA, lol, I have a hero template map that I use to make hero ideas/spells and I just happen to use four levels because it's more... dynamic.
 
yeah, 3 levels are just fine.

You want it to start at a greater % and instead of adding % per level, you want to add another second to sap per level?

yes. pretty much. that way it looks more like the Vae Victis of Kain, which kills the unit.

and try to figure a way to use just an attack where we swings sword from above.
 
Top