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

M

#### Moderator

11:12, 2nd Mar 2010
TriggerHappy:

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

#### StaberFire

Level 12
It is. I made them turn red during animation lol. I could remove that if you want, I just thought the spell needed a little flavour.

#### StaberFire

Level 12
Sorry for the wait, I had a small complication.

But it's updated now.

#### Dr Super Good

Spell Reviewer
Level 63
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).

#### StaberFire

Level 12
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.

#### StaberFire

Level 12
Either attack 1 or attack 2. Same rarities apply as just attacking. I tried to get it to be only attack 2 but I forget how rarities work when triggering animation. I'll fix that up for you tomorrow when I have more energy.

#### Deuterium

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

#### Misha

Level 47
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?

#### Roflcoptor

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

#### StaberFire

Level 12
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.

#### Cheezeman

Level 10
Could you post the code in the info?
It really helps

#### StaberFire

Level 12
Sure, I will in the next update, which should be soon.

EDIT: Updated, Misha I hope the sapping effect is what you asked for. If not I could always just change it again. =P

Last edited:

#### Misha

Level 47
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.

#### VoidLordXtreme

Level 10
cool spell! i really like it... maybe i will use it for my map.!

+rep for u both (for the idea and for the triggering .. lol)

#### StaberFire

Level 12
Well I've been searching and searching but I can't seem to find the correct combination of strings to play a specific attack animation. Maybe you could edit your model to change "attack - 1" to "attack slam" or something, then just use "attack - 2" as "attack - 1".

#### StaberFire

Level 12
Alrighty Misha, I dedicated an afternoon and finally got it squared away. =P

He will only play Attack - 2 animation now.

#### Deuterium

Level 17
What did you do so that it attacks only animation 2? (Too lazy to re-download )

#### StaberFire

Level 12
call SetUnitAnimationByIndex(unit, #)

Something like that.

#### Trinin

Level 4
Stolen

Stolen from builders and fighters 7.0 , undead vampire lord hero , spell vae victis , and removed the sound when kain said vaaaaaaaaae victus , anyways this was used in game blood omen by Kain

#### Dr Super Good

Spell Reviewer
Level 63
I highly doubt it is stolen unless the map was open source.

Replies
50
Views
15K
Replies
29
Views
10K
Replies
11
Views
14K
Replies
11
Views
14K
Replies
20
Views
12K