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

Need Help in Reducing all damages

Status
Not open for further replies.
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hello guys I have thought about an ability that will suit for a Tank Hero, something that will reduce all incoming damages to him by 50% for 7 seconds. Also that will support multiple levels, for example on level 1 reduces all damage by 10%, 15% on level 2 and 20% on level 3.

  • Defensive Stance
    • Events
      • Game - PDD_damageEventTrigger becomes Equal to 0.00
    • Conditions
      • (PDD_target has buff Defensive Stance) Equal to True
    • Actions
      • Set PDD_amount = (PDD_amount x -0.10)
I tried putting negative value to reduce the damage, I hope its right :ogre_icwydt:. I just don't know how make it support multiple levels.
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
That will reduce damage with 90%.

Say unit takes 100 damage for easy math. Then you multiple by 0.1. The damage will be 10. So you should multiply with 0.9 instead.

Regarding the level, it's quite simply actually. Have variables like this in the Init trigger:
DamageReduction[1] = 0.1
DamageReduction[2] = 0.25
DamageReduction[3] = 0.5

Then do the following in your trigger:
Set PDD_amount = (PDD_amount x (1 - DamageReduction[Level of ability YOUR_ABILITY for PDD_Target]))
 
Last edited:
Level 13
Joined
Aug 19, 2014
Messages
1,111
Okay guys I hope I did the right thing :ogre_haosis:

  • DS Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Constants --------
      • Set TempAbility = |cff00bfffDefensive Stance|r
      • Set Temp_Buff = Defensive Stance
      • -------- Damage Reductions --------
      • Set DamageReduction[1] = 0.10
      • Set DamageReduction[2] = 0.15
      • Set DamageReduction[3] = 0.20
      • Set DamageReduction[4] = 0.30
      • Set DamageReduction[1] = 0.40
  • DS Dmg Reduction
    • Events
      • Game - PDD_damageEventTrigger becomes Equal to 0.00
    • Conditions
      • (PDD_target has buff Defensive Stance) Equal to True
    • Actions
      • Set PDD_amount = (PDD_amount x (1.00 - DamageReduction[(Level of TempAbility for PDD_target)]))
 
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hehehe I missed that one, anyway thanks guys!

Edit: How can I make the hero play an specific animation and will stop playing when the buff is gone?
 
Status
Not open for further replies.
Top