• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Armor reduction passive spell

Status
Not open for further replies.
Level 6
Joined
Apr 5, 2015
Messages
165
Hello everyone,

I am, once again, in the dire need of help.
I want to create a passive spell that gives any enemy hit a buff which reduces the armor of the target by 2. This should work up to 5 times and the buffs should get removed after something like 10 seconds again and not stay forever. However, I have absolutely no idea how to get this working or how to even start. I used Bash as a base skill to setup the hit percentage with 0 damage and 0% stun ratio.

My question now is: Does my idea work? Does it work but maybe in a different way than i wrote it? And how could I start?

I'm thankful for any help in advance.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
It kinda will be easier with 1.29...however you can just as easily use a damage detection system right now.

The DDS will catch when the unit with the armor reducing passive attacks(damages) a unit via their auto attack. You could then check what level the passive is and roll if it "procs." At this point you would give the damaged unit a negative devotion aura that only effects the unit that was hit. You would then level the negative devotion up if it needed to go from -2 to -4 for example.

That will simulate the effect that you want.
 
Level 6
Joined
Apr 5, 2015
Messages
165
Update:

I managed to create the spell and it works perfectly. It just seems that I did create some big leaks in this one, since the game stutters a bit when the trigger is working. Not always but sometimes it seems.

Any idea why this happens?

  • Shieldbreak
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dwarven Shieldbreaker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff Shieldbreak 1) Equal to False
        • Then - Actions
          • For each (Integer A) from 1 to (Level of Shieldbreak for (Attacking unit)), do (Actions)
            • Loop - Actions
              • Unit - Add Shieldbash 1 to (Attacked unit)
              • Unit - Set level of Shieldbash 1 for (Attacked unit) to (Integer A)
              • Wait 5.00 seconds
              • Unit - Remove Shieldbash 1 from (Attacked unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Attacked unit) has buff Shieldbreak 1) Equal to True
              • ((Attacked unit) has buff Shieldbreak 2) Equal to False
        • Then - Actions
          • For each (Integer A) from 1 to (Level of Shieldbreak for (Attacking unit)), do (Actions)
            • Loop - Actions
              • Unit - Add Shieldbash 2 to (Attacked unit)
              • Unit - Set level of Shieldbash 2 for (Attacked unit) to (Integer A)
              • Wait 5.00 seconds
              • Unit - Remove Shieldbash 2 from (Attacked unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Attacked unit) has buff Shieldbreak 1) Equal to True
              • ((Attacked unit) has buff Shieldbreak 2) Equal to True
              • ((Attacked unit) has buff Shieldbreak 3) Equal to False
        • Then - Actions
          • For each (Integer A) from 1 to (Level of Shieldbreak for (Attacking unit)), do (Actions)
            • Loop - Actions
              • Unit - Add Shieldbash 3 to (Attacked unit)
              • Unit - Set level of Shieldbash 3 for (Attacked unit) to (Integer A)
              • Wait 5.00 seconds
              • Unit - Remove Shieldbash 3 from (Attacked unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Attacked unit) has buff Shieldbreak 1) Equal to True
              • ((Attacked unit) has buff Shieldbreak 2) Equal to True
              • ((Attacked unit) has buff Shieldbreak 3) Equal to True
              • ((Attacked unit) has buff Shieldbreak 4) Equal to False
        • Then - Actions
          • For each (Integer A) from 1 to (Level of Shieldbreak for (Attacking unit)), do (Actions)
            • Loop - Actions
              • Unit - Add Shieldbash 4 to (Attacked unit)
              • Unit - Set level of Shieldbash 4 for (Attacked unit) to (Integer A)
              • Wait 5.00 seconds
              • Unit - Remove Shieldbash 4 from (Attacked unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Attacked unit) has buff Shieldbreak 1) Equal to True
              • ((Attacked unit) has buff Shieldbreak 2) Equal to True
              • ((Attacked unit) has buff Shieldbreak 3) Equal to True
              • ((Attacked unit) has buff Shieldbreak 4) Equal to True
              • ((Attacked unit) has buff Shieldbreak 5) Equal to False
        • Then - Actions
          • For each (Integer A) from 1 to (Level of Shieldbreak for (Attacking unit)), do (Actions)
            • Loop - Actions
              • Unit - Add Shieldbash 5 to (Attacked unit)
              • Unit - Set level of Shieldbash 5 for (Attacked unit) to (Integer A)
              • Wait 5.00 seconds
              • Unit - Remove Shieldbash 5 from (Attacked unit)
        • Else - Actions
          • Do nothing
 
Last edited:
Level 6
Joined
Apr 5, 2015
Messages
165
Your current trigger is very messy because of too much filtering, you need to find a way to make it more efficient.

Yup, did that now. Still lags everytime the negative devotion aura gets added to a unit. Maybe it is the aura and not the trigger?

  • Shieldbreak Beta
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dwarven Shieldbreaker
    • Actions
      • For each (Integer B) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Attacked unit) has buff ShieldbreakBuff[(Integer B)]) Equal to False
            • Then - Actions
              • For each (Integer A) from 1 to (Level of Shieldbreak for (Attacking unit)), do (Actions)
                • Loop - Actions
                  • Unit - Add ShieldbreakSpell[(Integer B)] to (Attacked unit)
                  • Unit - Set level of ShieldbreakSpell[(Integer B)] for (Attacked unit) to (Integer A)
                  • Wait 5.00 seconds
                  • Unit - Remove ShieldbreakSpell[(Integer B)] from (Attacked unit)
            • Else - Actions
Edit: I found the solution. Hence the auras were never on any unit before, it is the same issue as with new spawned units coming in the map that are not loaded with map init. I added a peasant with the 5 abilities that gets removed when the game starts, and now no lags anymore.
It seems that this is the fix. Thanks everyone for the kind help!
 
Last edited:
Status
Not open for further replies.
Top