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

Armor Reduction on attack

Status
Not open for further replies.
Level 17
Joined
Apr 24, 2005
Messages
762
Okay so i wanted to have a passive skill which reduces the enemys armor by 1 each time the hero attacks. At first i tried having a negative Item Armor Bonus, but that spell can't be made negative for some reason... so i came up with this, it uses a dummy which acid bombs the target, the level of acid bomb being based on the custom value of the target. But for some reason it goes straight to -5 armor on the first hit, whats the problem?

  • Armor Reduction
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Hero
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 0
        • Then - Actions
          • Unit - Set level of Armor Reduction (-1) for DummyArmorRed to 1
          • Unit - Order DummyArmorRed to Neutral Alchemist - Acid Bomb (Triggering unit)
          • Unit - Set the custom value of (Triggering unit) to 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Set level of Armor Reduction (-1) for DummyArmorRed to 2
          • Unit - Order DummyArmorRed to Neutral Alchemist - Acid Bomb (Triggering unit)
          • Unit - Set the custom value of (Triggering unit) to 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 2
        • Then - Actions
          • Unit - Set level of Armor Reduction (-1) for DummyArmorRed to 3
          • Unit - Order DummyArmorRed to Neutral Alchemist - Acid Bomb (Triggering unit)
          • Unit - Set the custom value of (Triggering unit) to 3
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 3
        • Then - Actions
          • Unit - Set level of Armor Reduction (-1) for DummyArmorRed to 4
          • Unit - Order DummyArmorRed to Neutral Alchemist - Acid Bomb (Triggering unit)
          • Unit - Set the custom value of (Triggering unit) to 4
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 4
        • Then - Actions
          • Unit - Set level of Armor Reduction (-1) for DummyArmorRed to 5
          • Unit - Order DummyArmorRed to Neutral Alchemist - Acid Bomb (Triggering unit)
        • Else - Actions
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
I guess you didn't set "Data - Armor Penalty" according to level.
If you want to put negative values in object editor,just press and hold shift and then click on value you want to put negative.
About your triggers,you can easily make it much shorter if you use:

  • Unit - Set level of Armor Reduction (-1) for DummyArmorRed to ((Custom value of (Triggering unit))+1)
  • Unit - Order DummyArmorRed to Neutral Alchemist - Acid Bomb (Triggering unit)
  • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit))+1)
Also that ability can be abused because if you use event "Unit is attacked",that trigger is executed a bit before enemy is actually damaged so someone can abuse it by spamming "stop" order when attacking. To prevent that,use damage detection system,you may find several in spell section.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
I just tried adding negative value to "Item Armor Bonus" ability and it worked. :pal:
If you manage to do it,you can set several levels of that ability each having 1 more negative armor per level. And then,check when unit takes damage,and if damage source is the unit you want to decrease the armor of target,then add negetive armor bonus ability and increase it's level with each attack.
 
Level 17
Joined
Apr 24, 2005
Messages
762
Yes this was my first intention of doing it, but i dont know why i cant put that ability negative :/ im doing exactly as you say, hold shift and click on the downwards arrow. It works for all other abilites, but not this one, wtf?
 
Level 17
Joined
Apr 24, 2005
Messages
762
Yes, they're allowed...

EDIT: Tried using devotion aura with negative values and it still acts weird.
Gives -1 armor on first hit.
Nothing happens on 2nd hit.
Buff is removed on 3rd hit.
Gives -3 armor on 4th hit.
Nothing happens on 5th hit.
Buff is removed on 6th
-5 armor on 7th

WTF? How can this happen with a simple trigger like this?
  • Armor Reduction Copy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Hero
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Shredded Armor ) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Armor Reduction v2 (Item) for (Triggering unit)) Less than 5
            • Then - Actions
              • Unit - Increase level of Armor Reduction v2 (Item) for (Triggering unit)
            • Else - Actions
        • Else - Actions
          • Unit - Add Armor Reduction v2 (Item) to (Triggering unit)
 
Level 7
Joined
Nov 19, 2007
Messages
253
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of "Your Abillity" for (Attacking unit)) Greater than or equal to 1
    • Actions
      • Unit - Add "Debuff" to (Attacked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff "Debuff aura") Equal to True
        • Then - Actions
          • Set "Level_of_Debuff" = ("Level_of_Debuff" + 1)
          • Unit - Set level of "Debuff" for (Attacked unit) to "Level_of_Debuff"
        • Else - Actions
Well you this will last forever and if you want debuff to end you have to make something like timer (if you want i can make triggers for you).

EDIT: I think you should use devotion aura with negative armor value, 0 aoe effect.
 
Level 17
Joined
Apr 24, 2005
Messages
762
Gonna check it tomorrow

EDIT: Hmm when i opened the map in WE it told me the map was saved in a more recent version, i guess my WE is outdated or smth. I think i use JNGP 1.5d, what do u use?
EDIT2: Okay i copied the triggers/abilities anyway and everything works perfectly. Thanks +rep
 
Last edited:
Status
Not open for further replies.
Top