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

[Spell] Custom debuff on auto attack.

Status
Not open for further replies.
Level 1
Joined
Mar 3, 2017
Messages
2
Hey all,

I have been using the map editor for about a week and utilized this site a tonne. Hopefully I have chosen the correct forum to post my question.

I am trying to create a passive spell which applies a debuff to the target of the spell owner's auto attack.

I have been unsuccessful so far. I originally tried to just have a useless passive skill and add the debuff via triggers and a dummy unit, however, I was only able to locate the "A unit is attacked" event, rather than "A unit attacks" which makes much more sense in my head. After I gave up on that I tried to create a passive based off of Envenomed Weapons, which poisons the target of an auto attack from Envenomed Weapons' owner.

So the entire idea is.

Unit A applies a debuff to the unit it attacks
Unit B has a spell that deals damage, however, if the target of the spell is under the effect of Unit A's debuff from attack then an additional effect occurs.

I figured the best way to do this would be to have the auto attacking unit apply a modified Drunken Haze to the target and the spell Unit B casts would be a modified Breath Fire.

I can't seem to modify Envenomed Weapons to do what I want. I removed Poison (non stacking) and Poison (stacking) from Envenomed Weapons' buff field and added Drunken Haze, however, Envenomed Weapons still just applies the same poison with the only difference being that the poison deals 0 damage, as I set it in the Object Editor.

If it is not obvious, I am quite new so I appreciate any help, especially if it's worded as if you're talking to someone who is still trying to grasp the basics of the map editor.

Thank you very much for your time
 
Level 11
Joined
Jun 2, 2004
Messages
849
There are a few abilities that add debuffs on auto attack (like envenomed weapons) but many are hardcoded as to what buff they apply (like envenomed weapons) and all of them will have the original effects (as buffs are mostly just indicators).

You might want to delve into damage detection systems. You can download one from this site. If you can get it to work right, you'll be able to detect when an attack lands and spawn a dummy unit to use an ability to apply the buff you want. It's a bit roundabout, but that's wc3.
 
Well there are many ways to do this, the best method for you seems to be to learn how to use a damage detection system as other methods are either difficult or exploitable. The max amount of buffs/debuffs that can be displayed on one unit is 7 at any time.

GUI Damage Engine v3.6.0.1 - Might be a bit difficult if you just started learning how to use trigger editor however you should search the other resources by that author because he has made a lot of nice stuff easy for gui'ers that normally they wouldn't have access too if they don't know how to use JASS yet.

Physical Damage Detection for GUI v1.3.0.0 - This is another good damage detection system and the first one that started how to detect physical and spell damage apart from each other. Both systems aren't too difficult/complex and have good documentation and guide's on how to start using them.

If you want to add buffs/debuffs without displaying it in the unit's panel then you can use one of the abilities from the tornado unit for status bar visuals without the need of hidden spellbooks or visual abilities. Adding a buff to a unit
 
Last edited:
Level 1
Joined
Mar 3, 2017
Messages
2
Thank you both for your help and quick response. I will take a look at damage detection.

Thank you again!
 
Level 10
Joined
Oct 5, 2008
Messages
355
I have written a system which makes applying and managing the buff quite easy (although it is still waiting for its approval, so use it on your own risk.... Link)
. Like the others have said, you need surely a damage detection System to get the timing of the trigger right.
When using damage detection systems, i recommend throwing all on damage effects into a single trigger with if/then/else blocks, else there can come some problems, depending on what you want to create.
 
Status
Not open for further replies.
Top