• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] How to add Life Steal when Mana Shield is on?

Level 5
Joined
Oct 29, 2020
Messages
82
I wanna add Life Steal when Mana Shield is on and remove it when Mana Shield is off.
I know how to write the trigger to do this when the player turns on or turns off Mana Shield.
But when the hero Naga's mana drains and Mana Shield is turned off automatically, I don't know how to write the right trigger.
Could someone help?
 
Level 5
Joined
Oct 29, 2020
Messages
82
You mean like add the ability Life Steal to the unit that casted Mana Shield? But they only have Life Steal while Mana Shield is active?
Yes. When the hero Naga's mana drains and Mana Shield is turned off automatically, Life Steal should be removed. But I have problem with this.
 
Level 2
Joined
Nov 21, 2019
Messages
8
I think this trigger is quite simple. If you don't have Damage Enginer, use Event-Dmg Taken available in wc3 to definitely remove the lifesteal skill when the amount of damage received is greater than the current mana.

  • Mana Shield On
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(manashieldon))
      • (Triggering unit) Equal to ....
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Mana Shield On !
      • Unit - Add Item Life Steal to (Triggering unit)
      • -------- manashieldon = 852589 --------
  • Mana Shield Off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(manashieldoff))
      • (Triggering unit) Equal to ....
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Mana Shield Off !
      • Unit - Remove Item Life Steal from (Triggering unit)
      • -------- manashieldoff = 852590 --------
  • MSLifesteal Checking
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Triggering unit) Equal to ....
      • (Level of Item Life Steal for (Triggering unit)) Equal to 1
      • (Mana of (Triggering unit)) Less than (Damage taken)
    • Actions
      • Unit - Remove Item Life Steal from (Triggering unit)
 
Level 5
Joined
Oct 29, 2020
Messages
82
I think this trigger is quite simple. If you don't have Damage Enginer, use Event-Dmg Taken available in wc3 to definitely remove the lifesteal skill when the amount of damage received is greater than the current mana.

  • Mana Shield On
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(manashieldon))
      • (Triggering unit) Equal to ....
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Mana Shield On !
      • Unit - Add Item Life Steal to (Triggering unit)
      • -------- manashieldon = 852589 --------
  • Mana Shield Off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(manashieldoff))
      • (Triggering unit) Equal to ....
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Mana Shield Off !
      • Unit - Remove Item Life Steal from (Triggering unit)
      • -------- manashieldoff = 852590 --------
  • MSLifesteal Checking
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Triggering unit) Equal to ....
      • (Level of Item Life Steal for (Triggering unit)) Equal to 1
      • (Mana of (Triggering unit)) Less than (Damage taken)
    • Actions
      • Unit - Remove Item Life Steal from (Triggering unit)
Thanks to your guidance, I've found another simple way to solve this. Just have a look at the attached picture. I've tested it. It works.
 

Attachments

  • 2024-03-14 (3).png
    2024-03-14 (3).png
    34.7 KB · Views: 12
Top