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

Adding permanent bonus to MAX HP

Status
Not open for further replies.
Level 4
Joined
Feb 25, 2010
Messages
73
There is a way to make a ability that add bonus to MAX HITPOINTS (no strength) each time it kills a unit?

Something like this: you kill a unit. If it is a creep, then it add 1 permanent bonus max hp to the hero. If the dying unit is a hero, then add 10.

Somebody have a idea?
 
Level 4
Joined
Feb 25, 2010
Messages
73
I really don't understand well the triggers... Where i must put that conditions? I tried in a test trigger (like in the test map in the site) but it don't works...
 
  • Tr
  • Event
    • Unit - A unit dies
  • Conditions
    • (Level of YourAbility for (Killing unit)) Greater than 0
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • ((Triggering unit) is a Hero) Equal to True
      • Then - Actions
        • Set Max_hp = (Max_hp + 10)
      • Else - Actions
        • Set Max_hp = (Max_hp + 1)
    • Trigger - Run (The_Bonus_HP_trigger) (checking conditions)
It would be something like this. Don't know how you are going to configure your triggers/variables, this is some sample.
 
Level 4
Joined
Feb 25, 2010
Messages
73
well, i did what you tell me...but it don't works. Instead, the hero that i set in the 'some_unit' variable simply die when i kill a unit o_O

in another try, your life (600+) goes to "4" and after other kill, to "2".


I will post the map, so, if you can tell me what i am doing wrong i thanks ^^'

EDIT: Oh, i have changed the 'triggering unit' stances in the trigger that i did, but it yet dont works... :\
 

Attachments

  • AoS.w3x
    110.9 KB · Views: 62
Last edited:
Level 13
Joined
May 11, 2008
Messages
1,198
http://www.hiveworkshop.com/forums/pastebin.php?id=raon94
  • Hardened Shell
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Hardened Shell for (Killing unit)) Greater than (>) 0
    • Actions
      • Set Some_Unit = (Killing unit)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Dying unit) is A Hero) Equal to (==) True
          • Then - Actions
            • Set Max_Hp = ((Integer((Max life of Some_Unit))) + ((Level of Hardened Shell for Some_Unit) x 10))
          • Else - Actions
            • Set Max_Hp = ((Integer((Max life of Some_Unit))) + ((Level of Hardened Shell for Some_Unit) x 1))
      • Trigger - Run Set Max Hp <gen> (ignoring conditions)
 
Level 13
Joined
May 11, 2008
Messages
1,198
Ignore Nestharus. He cant tell permanent from non-permanent.

UnitMaxState is what youd want to use for permanent changes to a units maximum HP.

the code i put down works just fine and is in the test map i linked to. if he'd rather have jass than gui, then ya, better get the wc3c.net code. but...idk what that link is that you gave. seems to be the wrong code. http://www.wc3c.net/showthread.php?p=769567 is what i found.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Here are some ways...
1. Give the unit a tome of health.
2. Abuse the maximum HP bonus item abilities's incorrect level up and removal behaviour to give extra hitpoints.
3. Abuse a unit to hero and hero to unit converion via a morph ability to give extra hitpoints.
4. Use an set of item hitpoint abilities with binary values to create a system to change maximum hitpoints within a certain range.
5. Make the unit a hero and add strength.
6. Use an upgrade.

WARNING
1. Tomes will leak unless specifically removed after use via the appropiate native.
2. Will bug if the unit changes type giving ever more hitpoints every change.
3. Is highly unstable and may alter other stats, use at your own risk.
4. Can add signifficant load time to your map if large ranges are required.
5. Can also increase hitpoint regeneration and even damage.
6. Is permanent and can not be undone.

I advise method 4. Most reliable and with 20 odd abilities it can cover a huge range (more than most well made maps should ever use).
 
Level 13
Joined
May 11, 2008
Messages
1,198
Here are some ways...
1. Give the unit a tome of health.
2. Abuse the maximum HP bonus item abilities's incorrect level up and removal behaviour to give extra hitpoints.
3. Abuse a unit to hero and hero to unit converion via a morph ability to give extra hitpoints.
4. Use an set of item hitpoint abilities with binary values to create a system to change maximum hitpoints within a certain range.
5. Make the unit a hero and add strength.
6. Use an upgrade.

WARNING
1. Tomes will leak unless specifically removed after use via the appropiate native.
2. Will bug if the unit changes type giving ever more hitpoints every change.
3. Is highly unstable and may alter other stats, use at your own risk.
4. Can add signifficant load time to your map if large ranges are required.
5. Can also increase hitpoint regeneration and even damage.
6. Is permanent and can not be undone.

I advise method 4. Most reliable and with 20 odd abilities it can cover a huge range (more than most well made maps should ever use).

deaod's link seems to use 4. pharaoh's suggestion(which i implemented) uses 2. never heard of 3. 6 doesn't sound so ideal unless you wanted a limit. 5 is illegal. 1 sounds simple, but 2 seems simple too and no potential for problems that i know of.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Well, you may adjust the unit's hitpoints when it morphes. Does this also occur when the ability is set with UnitMakeAbilityPermanent?

Do not know what Deaod meant with permanent and non-permanent, life bonuses do not have visible differences, may it derive from the standard amount, strength or items.
 
Status
Not open for further replies.
Top