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

Percentage armor reduction?

Status
Not open for further replies.

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Devotion Aura has the option to increase percentage of the armor, but I think it only works on base armor, so I would not recommend using it. Other than that you can of course trigger it, bit it's a bit complicated. You need to find out the target's current armor, which is not that easy and increase it by a certain amount. For this you need multiple abilities, so you can set armor to any value (in a certain range).
 
Level 16
Joined
May 2, 2011
Messages
1,345
Devotion Aura has the option to increase percentage of the armor, but I think it only works on base armor, so I would not recommend using it. Other than that you can of course trigger it, bit it's a bit complicated. You need to find out the target's current armor, which is not that easy and increase it by a certain amount. For this you need multiple abilities, so you can set armor to any value (in a certain range).
This
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
One can use an ability system to provide an armor modifier (green +/- to armor). If one tracks all armor sources, then one can know a unit's current armor. Combining the two will give you the desired effect.

Someone made some custom natives that could read armor using an arbitrary code exploiy. However these might not work anymore and certainly could be broken by future patches if they do.
 
Level 9
Joined
Feb 28, 2017
Messages
195
there is a solution but its quite complicated,

Make a dummy abillity, use something like that targets a single target

set up a trigger that gives the targeted unit a devotion aura that has been tweaked to reduce the units armor by a percentage, set target to self and range to 100

make sure you make an appropriate trigger to remove this when time runs out or when a dispel like spell is cast upon the unit
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
I think devotion aura's percentage based armor change is bad, because it only considers base armor iirc. Another problem is, that this solution would give the unit 2 buffs - one from devotion aura and one from the single target ability you mentioned.
when a dispel like spell is cast upon the unit
Can you even detect this? Another option is to use periodic checks, if the unit still has the single target buff, but it's inaccurate and inefficient.
 
Status
Not open for further replies.
Top