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

Status
Not open for further replies.
Level 9
Joined
Apr 22, 2020
Messages
430
Hello guys can i request a triggered spell where it is an autocasted damage and armor reduction spell, to be specific an Auto - Cast spell where it reduces the damage and armor of an enemy unit for a short period of time.
 
Level 9
Joined
Apr 22, 2020
Messages
430
Does it reduce the Armor by a percentage or a flat amount?
the armor one is a specific amount and the damage is a percentage amount. And can you also add a trigger where it needs to be researched to enable that ability on my unit.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
Autocast Spell = Curse with no effect and 0.001 duration
Armor + Damage Reduction (Dummy) = Howl of Terror with Targets Allowed set to Ancients and 100.00 Area of Effect
  • Autocast Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Autocast Spell
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • -------- --------
      • -------- Create Dummy --------
      • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
      • Unit - Add Armor + Damage Reduction (Dummy) to (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- --------
      • -------- Only "Ancient" units can be affected by the Howl of Terror spell --------
      • Unit - Add classification of An Ancient to (Target unit of ability being cast)
      • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror.
      • Unit - Remove classification of An Ancient from (Target unit of ability being cast)
      • -------- --------
      • Custom script: call RemoveLocation (udg_TempPoint)
So when you cast Autocast Spell (Curse), I create a Dummy unit that casts Howl of Terror (Armor + Damage Reduction) on the position of the target unit.

Since Howl of Terror is an Area of Effect spell I wanted to make sure that only the Target unit of the ability is affected by it. To do this I made Howl of Terror only work on Ancient units and added the Ancient classification to the Target unit of ability being. I remove the Ancient classification right after the Dummy casts Howl of Terror so it won't cause any problems.

If you have Ancient classified units in your map this may cause problems since it will target them AND remove their Ancient classification permanently.

If you want you can remove the whole Ancient classification thing and try to give Howl of Terror a much smaller Area of Effect like 1.
 

Attachments

  • Autocast Spell.w3m
    18 KB · Views: 18
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Autocast Spell = Curse with no effect and 0.001 duration
Armor + Damage Reduction (Dummy) = Howl of Terror with Targets Allowed set to Ancients and 100.00 Area of Effect
  • Autocast Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Autocast Spell
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • -------- --------
      • -------- Create Dummy --------
      • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
      • Unit - Add Armor + Damage Reduction (Dummy) to (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- --------
      • -------- Only "Ancient" units can be affected by the Howl of Terror spell --------
      • Unit - Add classification of An Ancient to (Target unit of ability being cast)
      • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror.
      • Unit - Remove classification of An Ancient from (Target unit of ability being cast)
      • -------- --------
      • Custom script: call RemoveLocation (udg_TempPoint)
So when you cast Autocast Spell (Curse), I create a Dummy unit that casts Howl of Terror (Armor + Damage Reduction) on the position of the target unit.

Since Howl of Terror is an Area of Effect spell I wanted to make sure that only the Target unit of the ability is affected by it. To do this I made Howl of Terror only work on Ancient units and added the Ancient classification to the Target unit of ability being. I remove the Ancient classification right after the Dummy casts Howl of Terror so it won't cause any problems.

If you have Ancient classified units in your map this may cause problems.

If you want you can remove the whole Ancient classification thing and try to give Howl of Terror a much smaller Area of Effect like 1.
There is a problem not of the trigger but for the spell curse the you have to modify Uncle. Because the curse on has 0.1 duration and the howl of terror takes place of it but i noticed that my unit keeps casting the ability on the same unit even if it has already casted the "Curse" ability but the howl ot terror ability is still there but again the problem is that my unit keeps casting the spell on the unit again and again as long as it's not on cooldown and not casting it on other enemy units.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
There is a problem not of the trigger but for the spell curse the you have to modify Uncle. Because the curse on has 0.1 duration and the howl of terror takes place of it but i noticed that my unit keeps casting the ability on the same unit even if it has already casted the "Curse" ability but the howl ot terror ability is still there but again the problem is that my unit keeps casting the spell on the unit again and again as long as it's not on cooldown and not casting it on other enemy units.
The issue is the AI for autocast abilities. The AI considers any unit that doesn't have the Curse debuff when it's choosing a target, so it can target the same unit over and over again.

You can give the Curse debuff a longer duration to prevent this from happening.
 
Level 9
Joined
Apr 22, 2020
Messages
430
The issue is the AI for autocast abilities. The AI considers any unit that doesn't have the Curse debuff when it's choosing a target, so it can target the same unit over and over again.

You can give the Curse debuff a longer duration to prevent this from happening.
But will this also have the enemy unit have 2 buff on the same time meaning the curse and howl of terror buff displayed on the enemy unit?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
Why not use item armor increase and reverse it while have a trigger to check for the buff?
You could do that, but I don't think there's a pretty method for the % Damage Reduction.

I mean technically you could do it all through triggers and never even deal with buffs but that's a bit more complicated than I wanted it to be. My goal was to make it as user friendly as possible.
 
You could do that, but I don't think there's a pretty method for the % Damage Reduction.

I mean technically you could do it all through triggers and never even deal with buffs but that's a bit more complicated than I wanted it to be. My goal was to make it as user friendly as possible.

True, we lack proper % damage reduction. Closest would be BonusMod, but that's a hassle.
 
Level 27
Joined
May 18, 2018
Messages
397
First of all, my solution is designed for patch 1.27 or less so I don't know if it will work exactly as expected on newer patches. I created the Autocast spell based on Faerie Fire for armor reduction, while the Dummy Spell is based on Cripple for % damage reduction.

To avoid the issue of 2 buffs at the same time, I created a custom Buff and added it to both spells.

For some reason, when the dummy casts the second spell, the new buff will override the previous one, but the autocast seems to detect that it's the same buff so the unit will not cast it again.

The unwanted side effect is that you will have vision of the target unit due to Faerie Fire.

EDIT:
I wonder if you could apply that same method to my setup. It's using Howl of Terror as the buff for Dmg/Armor reduction and Curse for the autocast buff.

I updated the test map to apply your idea and it also works.
 

Attachments

  • test.w3x
    18.1 KB · Views: 18
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
First of all, my solution is designed for patch 1.27 or less so I don't know if it will work exactly as expected on newer patches. I created the Autocast spell based on Faerie Fire for armor reduction, while the Dummy Spell is based on Cripple for % damage reduction.

To avoid the issue of 2 buffs at the same time, I created a custom Buff and added it to both spells.

For some reason, when the dummy casts the second spell, the new buff will override the previous one, but the autocast seems to detect that it's the same buff so the unit will not cast it again.

The unwanted side effect is that you will have vision of the target unit due to Faerie Fire.
I wonder if you could apply that same method to my setup. It's using Howl of Terror as the buff for Dmg/Armor reduction and Curse for the autocast buff.
 
Level 9
Joined
Apr 22, 2020
Messages
430
Thanks for all your help guys. I never knew having one buff applied to both spells will only have one buff on the unit as well, i thought that both would show up but unexpectedly it shows only one for some reason.
 
Level 35
Joined
Feb 5, 2009
Messages
4,560
I'm a little late to the party here, but I've been encountering the same issue myself. Did so years ago, actually, and I've tried the doubling up on the same buff method before seeing others have tried it, but I also tested it with the Spellbreaker's Spell Steal.

It still counts as two buffs, basically, which is unfortunate. So Spell Steal will actually steal /two/ spells, one for each effect you apply. One might be a junk one, or one might be the Faerie Fire effect as was used here. The Spellbreaker will steal one of these first, and then the other second.

If anybody has a solution to handle the Spell Steal ability, though, that would be awesome since that's probably the only obstacle tbh.
 
Level 27
Joined
May 18, 2018
Messages
397
I'm a little late to the party here, but I've been encountering the same issue myself. Did so years ago, actually, and I've tried the doubling up on the same buff method before seeing others have tried it, but I also tested it with the Spellbreaker's Spell Steal.

It still counts as two buffs, basically, which is unfortunate. So Spell Steal will actually steal /two/ spells, one for each effect you apply. One might be a junk one, or one might be the Faerie Fire effect as was used here. The Spellbreaker will steal one of these first, and then the other second.

If anybody has a solution to handle the Spell Steal ability, though, that would be awesome since that's probably the only obstacle tbh.

Oh right, the Spell Steal ability...

It's a hassle to deal with so I usually just ignore it, as there is no way to determine which abilities can or cannot be stolen.

I would suggest creating a custom Spell Steal for these issues.
 
Level 35
Joined
Feb 5, 2009
Messages
4,560
That's pretty much the conclusion I've been coming to as well. It seems like an otherwise perfect solution, so long as you avoid using the "remove specific buff" trigger on that particular buff. Spell Steal is just a tad too finicky, and seems to be the only obstacle.

Also the effect itself does sound like Inner Fire with negative values in theory, but in practice if you did it that way, the values for the damage reduction are slightly off due to the way positive and negative values are calculated for warcraft's brand of "rounding" (this only really becomes an issue for damage values as it converts a Real value to an Int), and for the purpose of dispel or Spell Steal abilities, it will count as a positive buff despite being a debuff.

This is definitely an ability I've wanted to explore for quite some time, I'm hoping there's an approach I haven't yet explored.
 
Status
Not open for further replies.
Top