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

Potion of Healing - Huskar Inner Vitality

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi! I'd like to give Potions an effect like the one Huskar has (Inner Vitality)

I want to make Healing Potions Heal over time based on Unit Strength, like this:

HPotion 1. Heals (050hp) + (Str of unit) x 1 over 6 seconds.
HPotion 2. Heals (100hp) + (Str of unit) x 2 over 7 seconds.
HPotion 3. Heals (150hp) + (Str of unit) x 3 over 8 seconds.
HPotion 4. Heals (200hp) + (Str of unit) x 4 over 9 seconds.
HPotion 5. Heals (250hp) + (Str of unit) x 5 over 10 seconds.

Also Mana Potions Regenerate over time based on Unit Int, like this:

MPotion 1. Heals (050mp) + (Int of unit) x 1 over 6 seconds.
MPotion 2. Heals (100mp) + (Int of unit) x 2 over 7 seconds.
MPotion 3. Heals (150mp) + (Int of unit) x 3 over 8 seconds.
MPotion 4. Heals (200mp) + (Int of unit) x 4 over 9 seconds.
MPotion 5. Heals (250mp) + (Int of unit) x 5 over 10 seconds.

How can I do this? I haven't found anything like that in warcraft, just "Regeneration" spell that's over time, but I can't give it Healing Values like these.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
This should do it. this is for one item just add the others the same way. works with mana potions but you got to replace the life with mana in the triggers
  • prepare
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Your_item[1] = Replenishment Potion
      • Trigger - Turn off heal <gen>
  • Use potion
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Your_item[1]
        • Then - Actions
          • Set STR = (Strength of (Hero manipulating item) (Include bonuses))
          • Set Current_HP = (Life of (Hero manipulating item))
          • Set My_unit = (Hero manipulating item))
          • Trigger - Turn on heal <gen>
          • Wait 6.00 seconds
          • Trigger - Turn off heal <gen>
          • Else - Actions
  • heal
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Set life of my_unit to (HP + (Real(STR)))
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
It's supposed to work for every hero individually.

The fixed health value can be based on the ability: Rejuvenation, wich heals fixed amount over time.

In my map:
Health potions work based on Rejuvenation Potion, wich Regenerates life over time (For the fixed amount)
Mana Potions are dummy (because they get disppeled when attacked, even when "Dispen on attack" is Negative., so they trigger the system to give a Rune to the hero, and the Rune is based on Rejuvenation skill, wich can regenerate mana over time, that way both potions are autocast. This part is the easy one.

The hard part becomes when healing the amount of stat... Your trigger "Heal" reffers to Hero Manipulating item, and the Event has nothing to do with a unit. And would have a "Wait" to turn off after the preset amount of time =/
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Why is life set to 8.30 + Str? xD Should be "Current Life + Str"? xD
Anyway, i'll test and report in a week, i'm out for a while.
 
Status
Not open for further replies.
Top