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

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

Status
Not open for further replies.
Level 5
Joined
Oct 29, 2020
Messages
87
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
87
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
87
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: 18
Status
Not open for further replies.
Top