• 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.

damage reduction passive ability

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
Get your hands on a DDS (Damage Detection System) from the spell section.

This question has been asked dozens of times, if you search on google or with hive's search function you'll find more detailed answers.

I have been but I've found nothing and I think I have a DDS but I've got no clue how to use it for this ability or any other :/ Screenshot (388).png
 
Level 9
Joined
Jun 10, 2013
Messages
473
Use the damage event given by the DDS (there should be demos showing that)
then just set the damage variable to:
Damage = damage * 0.8
which will reduce the damage by 20%

so some thing like this :S

  • Enfeebling Venom
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Attacked unit) has buff Enfeebling Venom1 (Non-stacking)) Equal to True
          • ((Attacked unit) has buff Enfeebling Venom2 (Stacking)) Equal to True
    • Actions
      • Set DamageEvent = (DamageEvent x 0.80)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Almost.
Look at the examples mate:
http://www.hiveworkshop.com/forums/...ev=search=damage%20engine&d=list&r=20&u=Bribe

There's even a youtube video.

Sorry but I've looked at the examples and the youtube and still don't know what to do :/

  • Enfeebling Venom
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Attacked unit) has buff Enfeebling Venom1 (Non-stacking)) Equal to True
          • ((Attacked unit) has buff Enfeebling Venom2 (Stacking)) Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 0.80)
      • Set DamageEventTarget = (Attacked unit)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Wrong event and variable for the unit.

what would be the right one?

  • Enfeebling Venom
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (DamageEventTarget has buff Enfeebling Venom1 (Non-stacking)) Equal to True
          • (DamageEventTarget has buff Enfeebling Venom2 (Stacking)) Equal to True
    • Actions
 
Last edited:
Are you sure you read it? Even with the youtube video and amount of documentation Bribe put in his code, I find it strange that you come to into the forums looking for help as if it is any better. It just seems like you're looking for someone to do the work for you.

Regardless, if you take a look at the top of the damage engine trigger, this is what it says:
JASS:
// - Detect damage: use the event "DamageEvent Equal to 1.00"
// - To change damage before it's dealt: use the event "DamageModifierEvent Equal to 1.00"
// - Detect damage after it was applied, use the event "AfterDamageEvent Equal to 1.00"
// - Detect spell damage: use the condition "IsDamageSpell Equal to True"
// - Detect zero-damage: use the event "DamageEvent Equal to 2.00" (an AfterDamageEvent will not fire for this)
//
// You can specify the DamageEventType before dealing triggered damage. To prevent an already-improbable error, I recommend running the trigger "ClearDamageEvent (Checking Conditions)" after dealing triggered damage from within a damage event:
// - Set NextDamageType = DamageTypeWhatever
// - Unit - Cause...
// - Trigger - Run ClearDamageEvent (Checking Conditions)
//
// You can modify the DamageEventAmount and the DamageEventType from a "DamageModifierEvent Equal to 1.00" trigger.
// - If the amount is modified to negative, it will count as a heal.
// - If the amount is set to 0, no damage will be dealt.
//
// If you need to reference the original in-game damage, use the variable "DamageEventPrevAmt".
 
Level 9
Joined
Jun 10, 2013
Messages
473
Are you sure you read it? Even with the youtube video and amount of documentation Bribe put in his code, I find it strange that you come to into the forums looking for help as if it is any better. It just seems like you're looking for someone to do the work for you.

Regardless, if you take a look at the top of the damage engine trigger, this is what it says:
JASS:
// - Detect damage: use the event "DamageEvent Equal to 1.00"
// - To change damage before it's dealt: use the event "DamageModifierEvent Equal to 1.00"
// - Detect damage after it was applied, use the event "AfterDamageEvent Equal to 1.00"
// - Detect spell damage: use the condition "IsDamageSpell Equal to True"
// - Detect zero-damage: use the event "DamageEvent Equal to 2.00" (an AfterDamageEvent will not fire for this)
//
// You can specify the DamageEventType before dealing triggered damage. To prevent an already-improbable error, I recommend running the trigger "ClearDamageEvent (Checking Conditions)" after dealing triggered damage from within a damage event:
// - Set NextDamageType = DamageTypeWhatever
// - Unit - Cause...
// - Trigger - Run ClearDamageEvent (Checking Conditions)
//
// You can modify the DamageEventAmount and the DamageEventType from a "DamageModifierEvent Equal to 1.00" trigger.
// - If the amount is modified to negative, it will count as a heal.
// - If the amount is set to 0, no damage will be dealt.
//
// If you need to reference the original in-game damage, use the variable "DamageEventPrevAmt".

yes I have read and I still don't know how I can possibly use theis to trigger that when my hero who learns Ability_X attacks a unit, the attacked units attack will be reduced.
 
Level 9
Joined
May 21, 2014
Messages
580
Basically, it detects damage.
So, in your trigger, you need to add the event.
Setting that up right, your trigger will now fire for any instance of a unit that has been damaged.
To limit that, add the conditions.
Setting that up right, your trigger should now detect the attack of unit with Ability_X.

Now, in your actions, you still need to do the regular trigger thing; maybe create a dummy unit which casts howl of terror without any effects and apply buff to the attacked target, or cast an inner fire with negative damage, or use an aura, etc.
You have several choices on applying -dmg on the attacked unit, just be careful with buffs or abilities that you use with it because some buffs having based on the same ability will not stack.
e.g. You made a dummy skill based on Slow. Any other skills which applies a buff that uses Slow as the buff placer won't stack.

I am not descriptive enough, but I wanted you to read the documentation and find out how.

EDIT:
And guys, he is NOT trying to modify the damage being dealt within the event, but he is trying to apply a buff OR SOMETHING to an enemy unit so that the enemy unit has a minus damage so long as the attacked enemy has a buff.


Edit 2: Welp. I think you guys knew in the first place. (?) (@edit#1)
 
Level 7
Joined
Oct 19, 2015
Messages
286
Give your hero an ability that leaves a buff on the units he attacks. Then, use the damage detection system to reduce the damage dealt by units who have that buff.

Alternatively, you could use the damage detection system to detect when your hero deals combat damage to units and give those units an attack damage reduction ability. You'd also need some sort of buff system in this case to remove the damage reduction ability after some time.
 
Level 9
Joined
Jun 10, 2013
Messages
473
Basically, it detects damage.
So, in your trigger, you need to add the event.
Setting that up right, your trigger will now fire for any instance of a unit that has been damaged.
To limit that, add the conditions.
Setting that up right, your trigger should now detect the attack of unit with Ability_X.

Now, in your actions, you still need to do the regular trigger thing; maybe create a dummy unit which casts howl of terror without any effects and apply buff to the attacked target, or cast an inner fire with negative damage, or use an aura, etc.
You have several choices on applying -dmg on the attacked unit, just be careful with buffs or abilities that you use with it because some buffs having based on the same ability will not stack.
e.g. You made a dummy skill based on Slow. Any other skills which applies a buff that uses Slow as the buff placer won't stack.

I am not descriptive enough, but I wanted you to read the documentation and find out how.

EDIT:
And guys, he is NOT trying to modify the damage being dealt within the event, but he is trying to apply a buff OR SOMETHING to an enemy unit so that the enemy unit has a minus damage so long as the attacked enemy has a buff.


Edit 2: Welp. I think you guys knew in the first place. (?) (@edit#1)

but If I use any of your suggested dummy abilities then the effect won't work on units with magic immunity, when I need it to (just like slow poison)

  • Enfeebling Venom
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • DmgEvStarted Equal to (DamageEventTarget has buff Enfeebling Venom1 (Non-stacking))
          • DmgEvStarted Equal to (DamageEventTarget has buff Enfeebling Venom2 (Stacking))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has buff Enfeebling Venom1 (Non-stacking)) Equal to True
          • (DamageEventSource has buff Enfeebling Venom2 (Stacking)) Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 0.80)
        • Else - Actions
Then, use the damage detection system to reduce the damage dealt by units who have that buff.

That's what i'm trying to find out how to do.

P.S sorry if I sound like a winning toddler, I don't mean to give off that impression so apologies if I am :D
 
Level 9
Joined
Jun 10, 2013
Messages
473
So you mean...

Unit with Abil_X inflicts buff.

Affected Unit will have a reduced attack damage.

Is this right?

If so, in your current trigger, DamageEventTarget is the wrong variable to use.

YES! that's what I mean and then would it be source ? or...

  • Enfeebling Venom
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • DmgEvStarted Equal to (DamageEventSource has buff Enfeebling Venom1 (Non-stacking))
          • DmgEvStarted Equal to (DamageEventSource has buff Enfeebling Venom2 (Stacking))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has buff Enfeebling Venom1 (Non-stacking)) Equal to True
          • (DamageEventSource has buff Enfeebling Venom2 (Stacking)) Equal to True
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 0.80)
        • Else - Actions
 
Status
Not open for further replies.
Top