• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Spell Damage + INT condition

Level 11
Joined
Mar 1, 2009
Messages
360
  • IntSpellDamage
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Damage From Normal Attack) Equal to False
          • ((Damage source) is A Hero) Equal to True
          • ((Damage Target) has buff Damage Aura ) Equal to False
          • ((Owner of (Damage Target)) is an enemy of (Owner of (Damage source)).) Equal to True
    • Actions
      • Custom script: if BlzGetEventDamageType() != DAMAGE_TYPE_MIND then
      • Unit - Cause (Damage source) to damage (Damage Target), dealing (Real((Intelligence of (Damage source) (Include bonuses)))) damage of attack type Magic and damage type Mind
      • Custom script: endif
this triggers works just fine it adds a heroes INT to the damage of it's spells but.... i don't want it to work for spells like pheonix fire, immolation, and damage aura(as seen above).
is there a way to detect if a unit has multiple different buffs instead of listing the all in conditions as i did with Damage Aura above? or will that be fine? there are about 9 more buffs that i would need to place in there.
 
No, there is no way to list multiple buffs via single action. You will need to list them manually one by one in an "Or" condition block.

Also, if you are dealing the INT damage with attack type Magic and damage type Mind only to prevent dealing INT damage multiple times, then consider modifying damage dealt directly:
  • Event Response - Set Damage of Unit Damaged Event to ((Damage taken) + (Real((Intelligence of (Damage source) (Include bonuses)))))
 
The "Unit - A unit Takes damage" event fires when an attack reached targeted unit and damage is about to be applied to that unit. But it is not yet applied, giving you the option to modify damage dealt to the target. For example you could set damage dealt to 0 (which is what triggered spells like mana shield do). In case of my previous post, I did not set damage dealt to 0, but to "damage_dealt + int".

Attack and damage type were not modified, so those stay the same (i.e. it could be AttackType Hero, DamageType Normal).
The advantage is mostly optimization, using this:
  • Unit - Cause (Damage source) to damage (Damage Target), dealing (Real((Intelligence of (Damage source) (Include bonuses)))) damage of attack type Magic and damage type Mind
will fire your IntSpellDamage trigger again, while modifying damage dealt the way I showed will not run the same trigger again.

So to summarize, if you want this to work so that Hero deals "X" amount of [Hero, Normal] damage + INT amount of [Magic, Mind] damage, then what you have is fine. But if you don't care for the attack/damage type of the bonus damage and only used [Magic, Mind] damage to prevent endless loop/game crash, then I think it's better to modify damage dealt the way I showed.
 
Just dropping this as a quick note.

You don't need to use AND here:
  • Conditions
    • And - All (Conditions) are true
      • Conditions
        • (Damage From Normal Attack) Equal to False
        • ((Damage source) is A Hero) Equal to True
        • ((Damage Target) has buff Damage Aura ) Equal to False
        • ((Owner of (Damage Target)) is an enemy of (Owner of (Damage source)).) Equal to True
^ That's the same exact thing as this:
  • Conditions
    • (Damage From Normal Attack) Equal to False
    • ((Damage source) is A Hero) Equal to True
    • ((Damage Target) has buff Damage Aura ) Equal to False
    • ((Owner of (Damage Target)) is an enemy of (Owner of (Damage source)).) Equal to True
All needing to be true is the default behavior of Conditions.
 
Back
Top