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

Making Finger of Death Heal

Level 9
Joined
Jun 13, 2010
Messages
365
Hi,
I want to use Damage Engine from Bribe to make the base ability Finger of Death (named Holy Light) heal when cast on an ally instead of damage when on enemies.

I tried doing it like this:
  • Holy Light Heals
    • Events
      • Game - PreDamageEvent becomes Less than -1.00
    • Conditions
    • Actions
      • Custom script: //! runtextmacro DAMAGE_TRIGGER_CONFIG()
      • Set VariableSet DamageFilterSourceA = Holy Light
      • Custom script: //! runtextmacro DAMAGE_TRIGGER_CONFIG_END()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of DamageEventTarget) is an ally of (Owner of DamageEventSource).) Equal to True
        • Then - Actions
          • Set VariableSet DamageEventAmount = (0.00 - DamageEventAmount)
          • Set VariableSet DamageEventOverride = True
        • Else - Actions
But it doesn't work. What do I need to do? :)
 
I have never seen anyone use those textmacroes in a DamageEngine trigger. Never once. I am unaware of what they are for but my intuition is that whatever you’re doing with them is probably unnecessary.
Bribe uses it in 5.A version of Damage Engine, at least in the test map. I personally feel that approach is weird (hence I never use it with 5.A), but it is a valid approach as far as Damage Engine goes.

---

I think I found the issue. Look at this portion.
  • Game - PreDamageEvent becomes Less than -1.00
Remember that Damage Engine extrapolates the becomes portion. See the following:
Usage of the "<Event> becomes EQUAL to <value>" can be extrapolated as per the below:
  • EQUAL works as it always has - will run for any damage.
  • NOT EQUAL only runs for code damage.
  • LESS THAN only runs for damage from attacks but not coded attacks.
  • LESS THAN OR EQUAL only runs for melee attacks but not coded attacks.
  • GREATER THAN OR EQUAL only runs for ranged attacks but not coded attacks.
  • GREATER THAN only runs for Spell damage but not coded spell damage.
You want EQUAL or GREATER THAN instead of LESS THAN @SnowYell
 
Level 9
Joined
Jun 13, 2010
Messages
365
Why Finger of Death specifically?

Anyway, I think it would be DamageFilterTarget and DamageFilterSource, no? I think Damage Engine has something related to this somewhere in the example map (working with filters)
I was just looking for a spell which was instant an on target. Are there any better base spells? :)
I have never seen anyone use those textmacroes in a DamageEngine trigger. Never once. I am unaware of what they are for but my intuition is that whatever you’re doing with them is probably unnecessary.
This is my first time downloading Damage Engine so I am literally just trying to copy his examples in Bribes example triggers. xD
How would you do it, is there any other easier way?

Bribe uses it in 5.A version of Damage Engine, at least in the test map. I personally feel that approach is weird (hence I never use it with 5.A), but it is a valid approach as far as Damage Engine goes.

---

I think I found the issue. Look at this portion.
  • Game - PreDamageEvent becomes Less than -1.00
Remember that Damage Engine extrapolates the becomes portion. See the following:

You want EQUAL or GREATER THAN instead of LESS THAN @SnowYell
I had no idea it refers to the EQUAL, GREATER THAN etc... How weird. I thought it was the -1 that referred to the healing part. As I said right above, I honestly have no clue what I'm doing. Thanks man, it worked!

Now I just have an issue where the constants makes spells deal 25% less dmg to heroes and that decreases the healing towards an allied Hero. xD Any way around that?
 
I was just looking for a spell which was instant an on target. Are there any better base spells? :)

This is my first time downloading Damage Engine so I am literally just trying to copy his examples in Bribes example triggers. xD
How would you do it, is there any other easier way?


I had no idea it refers to the EQUAL, GREATER THAN etc... How weird. I thought it was the -1 that referred to the healing part. As I said right above, I honestly have no clue what I'm doing. Thanks man, it worked!

Now I just have an issue where the constants makes spells deal 25% less dmg to heroes and that decreases the healing towards an allied Hero. xD Any way around that?
If the reduction is consistent, you can check if DamageEventTarget is a hero and then before the 0 - DamageEventAmount you can set the DamageEventAmount to 4/3*DamageEventAmount

This will reverse the 25% damage lost and gives you the original prior to heal, assuming it is not blocked by Spell Immunity.

I think Channel will work well for your need and it can be instant, though you need to handle both damage and healing via triggers if you go this route.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
Sounds like you want a Lightning system + a very simple trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Your Spell
  • Actions
    • -------- Create Lightning from caster to the target unit of ability being cast --------
    • If all conditions are true
      • If - Conditions
        • ((Target unit of ability being cast) is an ally) Equal to True
      • Then - Actions
        • Unit - Set life of target to (life of target + X)
      • Else - Actions
        • Unit - Deal X damage to target
Note that Damage Engine adds some serious overhead to your map, I would only use it if you plan on taking advantage of it often.

In other words, importing it for a single spell is probably a bad idea.
 
Level 9
Joined
Jun 13, 2010
Messages
365
If the reduction is consistent, you can check if DamageEventTarget is a hero and then before the 0 - DamageEventAmount you can set the DamageEventAmount to 4/3*DamageEventAmount

This will reverse the 25% damage lost and gives you the original prior to heal, assuming it is not blocked by Spell Immunity.

I think Channel will work well for your need and it can be instant, though you need to handle both damage and healing via triggers if you go this route.
Ahh okay, that would work I guess. Thanks. :)
But the Channel ability would lack some initial base spell damage. If i trigger the spell damage from a trigger, it would be difficult for the Damage Engine to track which ability did the damaging, no?

Sounds like you want a Lightning system + a very simple trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Your Spell
  • Actions
    • -------- Create Lightning from caster to the target unit of ability being cast --------
    • If all conditions are true
      • If - Conditions
        • ((Target unit of ability being cast) is an ally) Equal to True
      • Then - Actions
        • Unit - Set life of target to (life of target + X)
      • Else - Actions
        • Unit - Deal X damage to target
Note that Damage Engine adds some serious overhead to your map, I would only use it if you plan on taking advantage of it often.

In other words, importing it for a single spell is probably a bad idea.
Sure, that makes sense. I plan to use it for every damage encounter in this map tho. Like everything including spells can crit etc. So I hope I can learn to do that :D
 
But the Channel ability would lack some initial base spell damage. If i trigger the spell damage from a trigger, it would be difficult for the Damage Engine to track which ability did the damaging, no?
Damage Engine had no issues detecting damage from any possible source.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
it would be difficult for the Damage Engine to track which ability did the damaging, no?
You are correct that there is no direct way to know. There are a variety of tricks you can use specifically to figure it out (setting some variables first, using a dummy to deal damage or cast a spell, flagging the damager with a hidden ability, using specific damage values and damage/attack types). How you resolve this depends specifically on how and why you need to know this.
 
Level 28
Joined
Nov 25, 2021
Messages
507
Should Dummy spellcasters be used instead instead of Damage Engine for simplicity's sake? Something like: If No Damage Finger of Death is used, then if target is Allied => heal + dummy cast Healing Wave (Visual Only), if target is enemy, then caster deals damage to target + dummy cast Finger (Visual Only).
 
Level 9
Joined
Jun 13, 2010
Messages
365
Damage Engine had no issues detecting damage from any possible source.
It cannot detect what ability caused the damage? I have tried several things for that. Not dmg caused by specific missiles/projectiles either?

Should Dummy spellcasters be used instead instead of Damage Engine for simplicity's sake? Something like: If No Damage Finger of Death is used, then if target is Allied => heal + dummy cast Healing Wave (Visual Only), if target is enemy, then caster deals damage to target + dummy cast Finger (Visual Only).
I could, but the thing is this will be difficult for using missiles/projectiles which is why i got Damage Engine in the first place i thought.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
It cannot detect what ability caused the damage?
No. What would it check? No native to give you any information. There's a method for attack indexing but I don't believe Bribe implemented it for DamageEngine and it wouldn't cover abilities. There are several roundabout solutions that might work some of the time but nothing direct you can rely on.
 
Level 9
Joined
Jun 13, 2010
Messages
365
No. What would it check? No native to give you any information. There's a method for attack indexing but I don't believe Bribe implemented it for DamageEngine and it wouldn't cover abilities. There are several roundabout solutions that might work some of the time but nothing direct you can rely on.
I just wished it would be able to track specific abilities, so it can apply the correct modifications for the right abilities (like 10% for this, 20% for that). Right now the only thing i am able to do is apply modifications for general basic attacks and general spells. Instant cast spells are able to work around but projectiles will be difficult.
 
Depending on how the triggered spell is created, a NOT EQUAL event is able to catch the spell dealing the damage if it is fully triggered. One thing that Damage Engine offers is the ability to create our own Damage Types and you can set your spell to deal a specialized type for the basis of detection of triggered damage.

This is how I wrote Snipeshot ability and filter out if I am dealing the main damage or the ability's damage.
 
Level 14
Joined
Oct 16, 2010
Messages
749
Is there an intention for this to deal damage to enemies and also heal allies depending on target?

If it's just a heal you could use Healing Wave with only 1 target? This is instant and has the lightning effect?

If not I would remove the damage value from Finger of Death and trigger damage/heal after cast depending on target? That way you can still have the lightning effect from the ability without having to use a whole system for that?


EDIT - Sorry looks like Uncle has already suggested this...
 
Top