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

Adapt or damage by buff

Status
Not open for further replies.
Level 3
Joined
Mar 3, 2011
Messages
58
restore-life-every-x-seconds-damage-undead/

I already got this trigger and worked on it and changed to fit my needs.
Instead of it, i would like to simplify it by damaging a unit by buffs and the kill belong to the owner of the buff.

My structures have a negative unholy aura that causes damage, but since its negative regeneration, when the unit reaches 0 hp, they suicide.
I've been trying to decipher Heartstopper Aura, but i'm still too dumb to do so.

For the time beign, i'm using a tornado building damage aura with the same damage, the only problem is that it causes the "unit is under attack" message to pop up and doesn't damage invulnerable.

I was thinking of damaging a unit when the have the aura's buff, but only if they are undead, and also credit the kill to the owner of the aura
 
Level 13
Joined
Jul 15, 2007
Messages
763
Any damage will cause a "unit is under attack".

I think Heartstopper is done as HP loss (not damage or negative regeneration), so you will likely need to periodically check the units under the aura, modify their hp, and cause the aura bearer to deal lethal damage to them when the hp loss would otherwise be fatal.

Could easily be done as non-MUI, but for MUI, i have no idea
 
Level 3
Joined
Mar 3, 2011
Messages
58
Negative unholy aura doesn't proc the "unit is under attack", since the unit is just losing hp instead of beign (directly) damaged

I will take a look at the raw code of the HSA
if it is indeed a unholy aura with triggers
or the unholy aura is just a place holder for the trigger

Edit:
indeed, the ability is just a place holder. It does nothing.

[A01N]
code=AUau
checkDep=1
levels=4
reqLevel=1
targs1=air,enemies,ground,nonancient
Area1=1200
BuffID1=B084
targs2=air,enemies,ground,nonancient
Area2=1200
BuffID2=B084
targs3=air,enemies,ground,nonancient
Area3=1200
BuffID3=B084
targs4=air,enemies,ground,nonancient
Area4=1200
BuffID4=B084
Art=ReplaceableTextures\PassiveButtons\BTNSpell_Holy_SealOfRighteousness.blp
Buttonpos=1,2
Targetart=Abilities\Spells\NightElf\TargetArtLumber\TargetArtLumber.mdl
Researchart=ReplaceableTextures\CommandButtons\BTNSpell_Holy_SealOfRighteousness.blp
Researchbuttonpos=1,0
Targetattach=origin
Name="Heartstopper Aura"
Tip="Heartstopper Aura - |cffffcc00Level 1|r","Heartstopper Aura - |cffffcc00Level 2|r","Heartstopper Aura - |cffffcc00Level 3|r","Heartstopper Aura - |cffffcc00Level 4|r"
Ubertip="Stills the hearts of nearby opponents, causing them to lose 0.6% of their max HP per second. AoE of 1200. ","Stills the hearts of nearby opponents, causing them to lose 0.9% of their max HP per second. AoE of 1200. ","Stills the hearts of nearby opponents, causing them to lose 1.2% of their max HP per second. AoE of 1200. ","Stills the hearts of nearby opponents, causing them to lose 1.5% of their max HP per second. AoE of 1200. "
Researchtip="Learn Hear|cffffcc00t|rstopper Aura - |cffffcc00Level %d|r"
Researchubertip="The deathly air stills the hearts of his opponents, causing them to lose a percentage of their max health over time. 1200 AoE. |n|n|cffffcc00Level 1|r - 0.6% |n|cffffcc00Level 2|r - 0.9% |n|cffffcc00Level 3|r - 1.2% |n|cffffcc00Level 4|r - 1.5%"
Researchhotkey="T"


this is the killing part

Function 4
Store the current enum unit as EnumUnit

Store the current HP of EnumUnit as CurrentHP
Store the max HP of EnumUnit as MaxHP

Set Removal to ((0.002 + 0.002*Level)*MaxHP)/2

If [CurrentHP < Removal] then
Set the HP of EnumUnit to 1

Make Source damage EnumUnit for 100 pure damage
//ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC
Make Source damage EnumUnit for 100 magic damage //ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE
Make Source damage EnumUnit for 100 physical damage //ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL

Im going to try and test a few things here
make the aura deal damage, and use a trigger to check if the unit has buff and less than x hp, then kill it

Edit:
How do i credit the kill?
'-'
 
Last edited:
Status
Not open for further replies.
Top