[General] Double Damage

Level 37
Joined
Aug 14, 2006
Messages
7,602
Hey,

I'm creating an ability. If under effect of an ability the unit receives double damage from basic attacks.

I tried this but it didn't work:

  • Frozen Paradise Attack I Ultimate Ability
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is in UG_Frozen_Paradise) Equal to True
    • Actions
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Damage taken) damage of attack type Spells and damage type Normal
Do you have a way that could work?
 
Level 10
Joined
Jan 20, 2011
Messages
492
Is attacked triggers before you deal the damage, so in the Action dealing (Damage Taken) probably won't work, since it hasn't registered damage yet, not dealing double damage.

So you will need to use a damage detection system
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,107
Is attacked triggers when a unit begins the attack sequence before it goes past a point of no return. This means that players controling units with animation backswing can trigger the event just by pressing S (Stop ability) with a period less than the backswing.

No damage is dealt during the event so there is no event response for damage taken.
 
Level 4
Joined
Jan 27, 2010
Messages
133
When the effect starts, add a command aura, targets: self, with 100% increase. Don't know how much that will work with bonuses. but it's probably one of the easier methods.

Or, if the unit is casting the ability on itself, you can use roar (Battle cry, or whatev it's called. Druid of the Claw's ability).
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Well, what about simply doing same damage twice? Works for me too.

Dangerous, because this will also deal damage if the attack missed the target or you canceled the attack before damage was dealt -> bugged and abusable.

If you don't want to use a DDS then just use roar as themerion said. It does exactly what you want (you don't even need to create an ability for that).
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Maker's trigger uses the damage engine which Aero won't use.

You can use a trigger to add all unit to a group at map init and another to add units to said group with the unit enter map event. You will also need a turned off, no event trigger called Take Damage. Add to that trigger the event unit in the group take damage. Then run a Unit Attacked trigger, if the attacker has a buff from your ability run a 0.4 timer. Turn on the Take Damage trigger and add the Timer Expire event to it. You can then add actions to the Take Damage trigger with (Damage Taken). Turn off Take Damage at the end of your action code.

I'm on a phone so I can't post triggers. Sorry.
 
Level 6
Joined
Nov 24, 2012
Messages
218
It has to be Maker's trigger.
There is no other way of detecting Physical Damage and applying it on the double.
You could register all affected units in a damage event but it wouldn't be as efficient as a damage system, and it would have no way of identifying physical vs spell damage.

As an easy alternative you could create negative armor aura in the spell's area of effect.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you don't want to import a system, just use the default Blizzard trigger function;
  • Unit - Blood Mage 0000 <gen> Takes damage
If the unit is not a pre-defined unit, do this;
  • Trigger - Add to Damage Event <gen> the event (Unit - (Triggering unit) Takes damage)
As for the 2nd trigger, make sure that the unit don't get registered twice (you can use Unit Group check for this, etc).
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Triggering unit) is in UnitGroup) Equal to False
    • Then - Actions
      • Trigger - Add to Damage Event <gen> the event (Unit - (Triggering unit) Takes damage)
      • Unit Group - Add (Triggering unit) to UnitGroup
    • Else - Actions
The (Triggering unit) is up to you on how you want to register the unit event.
The way I see it, this event occurs when unit enters UG_Frozen_Paradise region, right ?
Therefore, use this as your event.

  • Damage Event
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause (Damage source) to damage (Triggering unit), dealing (Damage taken) damage of attack type Hero and damage type Normal
      • Trigger - Turn on (This trigger)
Since the unit (Source) has damaged the unit (Target) initially, you would just need the same damage amount to be dealt to the unit (Target), thus making it 2x damage.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
@HesitationSnow: Damage engine is the best but if you read through the whole thread you will see that the OP vehemently refuse to use a system. I am just suggesting a bad but applicable alternative.

Defskull's is almost my suggestion earlier, only missing the 0.4s attack timer as a (bad) way to detect physical damage.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
There is no proper way to detect if the damage came from a spell or not. There are some options:

1) You trigger all spell damage, don't make anything in object editor deal damage. This way you can exclude spell damage from being multiplied
2) Or use an orb ablity that applies a buff. Unit takes damage, has buff -> damage came from basic attack. Orb effects do not stack (no slow and life steal for example at the same time), you can only have one at a time, so this is not so good solution.
3) Use the system I posted. However some spells might deal physical damage (like Barrage) but that is rare and avoidable.

The method Doomlord and defskull suggested multiplies all damage.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Hey,

I'm creating an ability. If under effect of an ability the unit receives double damage from basic attacks.

I tried this but it didn't work:

  • Frozen Paradise Attack I Ultimate Ability
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is in UG_Frozen_Paradise) Equal to True
    • Actions
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Damage taken) damage of attack type Spells and damage type Normal
Do you have a way that could work?

He only wants physical.
 
Top