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

Item exchanges mana for health ?

Status
Not open for further replies.
Level 30
Joined
Aug 29, 2012
Messages
1,383
This should do the trick:
  • Exchange
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourItemAbility
    • Actions
      • Set VariableSet HP = ((Percentage life of (Triggering unit)) x 1.50)
      • Set VariableSet MP = ((Percentage mana of (Triggering unit)) x 0.50)
      • Unit - Set life of (Triggering unit) to HP%
      • Unit - Set mana of (Triggering unit) to MP%
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
Your post is too vague to give you a proper solution. Chaosium's suggestion works but I'm certain it's not what you want (we can only guess).

What is 50% mana? Is that current mana or max mana? Do you need more than 50% current mana to use the item in the first place?

What does exchange mean? Is it a 1:1 ratio? If 50% of my current mana is equal to 200 mana, does that mean I gain 200 life?
 
Level 5
Joined
May 8, 2020
Messages
87
Your post is too vague to give you a proper solution. Chaosium's suggestion works but I'm certain it's not what you want (we can only guess).

What is 50% mana? Is that current mana or max mana? Do you need more than 50% current mana to use the item in the first place?

What does exchange mean? Is it a 1:1 ratio? If 50% of my current mana is equal to 200 mana, does that mean I gain 200 life?
it is suppose i have 1000 mana but i used up 500 i still have 500 mana left (so it can be called current mana)
I will trade for 500 mana and my mana will run out
The third one is correct in my opinion
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
it is suppose i have 1000 mana but i used up 500 i still have 500 mana left (so it can be called current mana)
I will trade for 500 mana and my mana will run out
The third one is correct in my opinion
Okay, so take Chaosium's trigger and adjust it to use flat values instead of percentages:
  • Exchange
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourItemAbility
    • Actions
      • Set VariableSet MP = ((Mana of (Triggering unit)) x 0.50)
      • Unit - Set life of (Triggering unit) to (Life of (Triggering unit) + MP)
      • Unit - Set mana of (Triggering unit) to (Mana of (Triggering unit) - MP)
 
Last edited:
Status
Not open for further replies.
Top