[Trigger] Issue with Defend - Reflect Life Stealing (Triggered Orb Effect)

Level 11
Joined
Aug 24, 2022
Messages
430
Hello everyone! How are you going? I'm here one more time, now asking for help to detect where is the problem. Let me explain:

Recently, I've triggered all orb effects in my project, so they can stack (different from the standard orb effects). One of my heroes have a Reflect ability, based on Footman's Defend. Basically, it can reflect enemies projectile back to them.

This is one of the items that have life steal. I did these triggers using tutorials here at Hive, and I liked that they can life steal more than once, if you have more than one item, so I let it as it is. My doubt is: Is there a way to not make the life steal event occur, if the attacks come fron an enemy? I'm looking for an answer because, unexpectedly this is a good dynamic, but it just don't fit in the hero's idea, nor in the game itself, because the hero itself is a great Tank STR Hero. With this, he is almost unkillable.

Thanks in advice.

  • Vampiric Mechanism 20
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • ((Damage source) has an item of type |cffa04b32Vampiric Mechanism|r (|cffffff00Rank 2|r)) Equal to True
      • (Damage From Normal Attack) Equal to True
      • ((Damage source) is an illusion) Equal to False
    • Actions
      • Set VariableSet Orb_LifeSteal = 0.20
      • Set VariableSet Orb_LifeSteal_Damage = (Damage taken)
      • Set VariableSet Orb_LifeSteal_Total = (Orb_LifeSteal_Damage x Orb_LifeSteal)
      • Set VariableSet Orb_LifeSteal_PopuP = (Integer(Orb_LifeSteal_Total))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Orb_LifeSteal_Total Greater than 1.00
        • Then - Actions
          • Unit - Set life of (Damage source) to ((Life of (Damage source)) + Orb_LifeSteal_Total)
          • Floating Text - Create floating text that reads (+ + (String(Orb_LifeSteal_PopuP))) above (Damage source) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 128.00 towards 90.00 degrees
          • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
        • Else - Actions
          • Do nothing
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
My doubt is: Is there a way to not make the life steal event occur, if the attacks come fron an enemy?
  • Conditions
    • ((Damage Target) belongs to an Enemy of (Owner of (Damage source))) Equal to True

Also, I imagine you added this Condition because you didn't want the Lifesteal to display "+0":
  • Orb_LifeSteal_Total Greater than 1.00
But this also has the side effect of preventing you from gaining life in those rare cases even though you should.


Doing it like this will ensure that you always gain life if you've dealt damage:
  • Vampiric Mechanism 20
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • ((Damage source) has an item of type |cffa04b32Vampiric Mechanism|r (|cffffff00Rank 2|r)) Equal to True
      • (Damage From Normal Attack) Equal to True
      • ((Damage source) is an illusion) Equal to False
      • (Damage taken) Greater than 0.00
    • Actions
      • Set VariableSet Orb_LifeSteal_Total = ((Damage taken) x 0.20)
      • Unit - Set life of (Damage source) to ((Life of (Damage source)) + Orb_LifeSteal_Total)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Orb_LifeSteal_Total Greater than 1.00
        • Then - Actions
          • Floating Text - Create floating text that reads (+ + (String((Integer(Orb_LifeSteal_Total))))) above (Damage source) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
        • Else - Actions
          • Floating Text - Create floating text that reads (+1) above (Damage source) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 128.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
      • Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
Now it will always display at least "+1" which is a pretty fair compromise. You were already rounding down most of the time anyway so it's not like the text was ever precise.
 
Last edited:
Level 11
Joined
Aug 24, 2022
Messages
430
I thought that I've already answered this thread, sorry for my late Uncle. The subject fell into oblivion, I didn't test the solution... I've just forgot it LOL.
EDIT: I've wrote this in a hurry, and didn't notice that I can just put a "Is a Hero equal to True" condition in the trigger. If I find the button to erase this post, I'll erase it. Sorry for the inconvenience.

Well, my answer for the problem, didn't solved it.

cond.gif
Conditions
  • joinbottom.gif
    if.gif
    ((Damage Target) belongs to an Enemy of (Owner of (Damage source))) Equal to True

Your answer for the problem Uncle, also didn't solve it. Hero kept life stealing from enemy attacks.

Something I've noticed, is that a repelled missile is considered an attack from the repelling unit. Like a swordsman repels an arrow, and game acts like he shot the arrow.

While I don't find a definitive solution, I have two things in mind:

  1. This issue caused an interesting dynamic for the hero, but he got too powerful as a tank. I can nerf him, removing his base magic resistance, as his passive is based in Elune's Grace. I don't know.
  2. Remove life steal from him. But as this, could be unfair for players that play with him.

Making Life Steal the only normal Orb Effect in the entire project, is not a solution, because some heroes have custom missiles, like Moon Glaive and Vorpal Blades. Orb effect break their attack styles, and or they just don't attack, or orb don't take effect (usually the first issue takes effect).

EDIT: I've never saw a project with custom life steal, and a hero with reflect ability. Maybe is this a thing?
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
You could trigger the Defend ability with a custom reflect system.

On Taking Damage -> If DamageTarget Has Defend Active (Buff/Boolean) and IsDamageRanged Equal to True -> Roll some dice -> If roll is successful then launch a Missile at DamageSource

On 1.31+ you can even get the DamageSource's Attack - Missile properties -> Missile Art, Missile Speed, etc. and apply those to your custom missile.
 
Level 11
Joined
Aug 24, 2022
Messages
430
For now, I've just removed the hero with Deflect from Life Steal triggers. It is a temporary solution, as hero is not effective with life steal effects.

I'll study more and check my possibilities, because every solution has a side effect for the project itself, and this will take time. I want to make things as perfect as possible. Your recommendation is bookmarked, so I can explore it when I get more time.

EDIT: The top 1 definitive solution for now, is the triggered Deflect ability.
 
Top