• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Item that deals bonus damage to specific type of enemy

Status
Not open for further replies.
Level 4
Joined
Nov 16, 2019
Messages
55
Hi there.

Another question for you map-fessors out there. I want to make an item which gives extra damage on basic attacks against a specific enemy type (Undead units). How does one create a spell or trigger to do this?
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
a damage detection system would probably be the best way to do this

I use this one:


this thread has instructions on how to use it:


good luck!
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,682
@Lordul Dracula
That approach with 3 triggers seems very unnecessary. You can simplify it to this:
  • Bonus Dmg Simple
    • Events
      • Game - GDD_Event becomes Equal to 1.00
    • Conditions
      • (GDD_DamagedUnit is Undead) Equal to True
      • (GDD_DamageSource has an item of type YourItem) Equal to True
    • Actions
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing 100.00 damage of attack type Normal and damage type Normal
Now it's MUI friendly as well.

Also, GDD is an older Damage Engine that hasn't been updated in ages so one should be cautious when using it. For example, glancing at the code I can see it's still using the index limit of 8192 instead of the "new" limit of 32768. It may still work fine and it certainly has far less variables than Bribe's Damage Engine, but it's not up to date so keep that in mind.

Additionally, the user may want to modify the power of their attack, rather than dealing a separate instance of damage:
  • Set Variable GDD_Damage = GDD_Damage + 100.00
This will work as if the damaging unit had +100 green damage on their weapon, which could be nice for effects like lifesteal, cleave, criticial strike, etc.

This is assuming that GDD can do this.
 
@LorD Dracula That approach with 3 triggers seems very unnecessary. You can simplify it to this:
  • Bonus Dmg Simple
    • Events
      • Game - GDD_Event becomes Equal to 1.00
    • Conditions
      • (GDD_DamagedUnit is Undead) Equal to True
      • (GDD_DamageSource has an item of type YourItem) Equal to True
    • Actions
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing 100.00 damage of attack type Normal and damage type Normal
Now it's MUI friendly as well.

Also, GDD is an older Damage Engine that hasn't been updated in ages so one should be cautious when using it. For example, glancing at the code I can see it's still using the index limit of 8192 instead of the "new" limit of 32768. It may still work fine and it certainly has far less variables than Bribe's Damage Engine, but it's not up to date so keep that in mind.
Yes, I know there is a better Damage Engine, but I use war 1.30, so most Damage Engine will not work for me.
 
if you only want more attack power vs undead an attack event is enough: In which you add a claw of attack (flat ATK) skill to the attacker or an elunes grace/demolisher skill (% Dmg). When the unit got the skill but is not attacking an undead remove the atk bonus skill.

Or you could use the lightning orb skill and let it cast holy light which is only allowed to target enemies (spell damage on hit, but orb).

  • Unit Attacked
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of UndeadKiller for (Attacking unit)) Not equal to 0
          • (Level of Item: UndeadKiller-Bonus (+15) for (Attacking unit)) Not equal to 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is Undead) Equal to True
        • Then - Actions
          • Unit - Add Item: UndeadKiller-Bonus (+15) to (Attacking unit)
        • Else - Actions
          • Unit - Remove Item: UndeadKiller-Bonus (+15) from (Attacking unit)
 
Last edited:
Level 4
Joined
Nov 16, 2019
Messages
55
if you only want more attack power vs undead an attack event is enough: In which you add a claw of attack (flat ATK) skill to the attacker or an elunes grace/demolisher skill (% Dmg). When the unit got the skill but is not attacking an undead remove the atk bonus skill.

Or you could use the lightning orb skill and let it cast holy light which is only allowed to target enemies (spell damage on hit, but orb).

  • Unit Attacked
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of UndeadKiller for (Attacking unit)) Not equal to 0
          • (Level of Item: UndeadKiller-Bonus (+15) for (Attacking unit)) Not equal to 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is Undead) Equal to True
        • Then - Actions
          • Unit - Add Item: UndeadKiller-Bonus (+15) to (Attacking unit)
        • Else - Actions
          • Unit - Remove Item: UndeadKiller-Bonus (+15) from (Attacking unit)
This is exactly what I was looking for, will try it out, thanks!
 
Status
Not open for further replies.
Top