Damage Stack buff

idk_a_name

ABC GUM :D
Reaction score
43
How would I make an aura spell that when attacked the owner of the aura gains X damage each time he is attacked, stacking up to X times, also the + damage goes away if he hasn't been attacked for X amount of seconds?
 
D

Down

Guest
you can use,

Code:
Untitled Trigger 002
    Events
        Unit - A unit Is attacked
    Conditions
        ((Triggering unit) has buff Barkskin) Equal to True
    Actions
        Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)

Code:
Untitled Trigger 002
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) has buff Barkskin) Equal to True
    Actions
        Unit - Cause (Attacking unit) to damage (Attacked unit), dealing ((Real((Custom value of (Attacking unit))))*X) damage of attack type Chaos and damage type Normal


Code:
Untitled Trigger 002
    Events
        Time - Every 10.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)((((Matching unit) has buff Barkskin) Equal to True) and ((Custom value of (Matching unit)) Greater than 0))) and do (Actions)
            Loop - Actions
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)

**Barkskin, is just a place holder for what ever your auras buff will be
*Damage X would be whatever damage multiplier you would want to use
 

Grymlax

Probably not around
Reaction score
138
i chosed another way of creating this spell.

you need 1 trigger and 2 spells to do it my way.
the first spell you need is the visual part. the one that shows you it's icon. i based it off evasion and changed it's data to 0.
the other spell will be invisible but it's the one that will add the damage to the hero. i based it of Item Damage Bonus and then I changed it's number of levels to 100. each level gives 2 more damage then the previous one. (with autofill you can fil the levels in only a cuple of seconds)

then create this trigger
Code:
Masochist
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Masochist  for (Triggering unit)) Greater than 0
    Actions
        Unit - Set level of Damage Bonus  for (Triggering unit) to ((Level of Damage Bonus  for (Triggering unit)) + (Level of Masochist  for (Triggering unit)))
        Wait 10.00 seconds
        Unit - Set level of Damage Bonus  for (Triggering unit) to ((Level of Damage Bonus  for (Triggering unit)) - (Level of Masochist  for (Triggering unit)))

here is an attached map so that you can try it out.
 

Attachments

  • masochist.w3x
    18.6 KB · Views: 94
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top