+ Maximum HP Aura Ability

jedi8955

New Member
Reaction score
4
This time around, I'm trying to make an aura that adds to a unit's maximum hp, preferably as a percentage. As usual, I can't find a good analogue in the default abilities. Here's the ability as designed:

Inspiration-
Inspired by the sight of a true champion, the surrounding allied units are able to withstand more damage.

Level 1: Adds +30% to max HP.
Level 2: Adds +40% to max HP.
Level 3: Adds +50% to max HP.

This ability is going to be on 3 different units, each unit will have one of the 3 levels of the aura. They also need to *not stack*. I'd guess that the best way to avoid stacking issues is to make 3 different abilities, one that adds +30%, then two that add +10% that stack, then just give the highest level unit all 3 abilities. But, that's just a guess, I really don't know.

I thought about dealing with this in a trigger, but I couldn't find a way to change a unit's maximum hps as an action, just their current hp.

Any help would be greatly appreciated. Thanks!
 
there are item abilities that increase max health, not sure exactly what it's called though. You could check if a unit has a specific buff and add the ability to the unit if it does.

like,

every 5 seconds

actions
pick every unit with buff


or something like that. To prevent it from stacking, you could add the unit to a unit group if it has the buff, if a unit is in this unit group, then don't add the ability. I'll post a trigger in a sec. hold on.

edit - I posted the trigger but noticed an error with it. I'll fix it real quick.

ok, this should work

Trigger:
  • Life Aura
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set UnitGroup = (Units in (Playable map area) matching (((Matching unit) has buff Life Aura) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in LifeGroup) Equal to True
            • Then - Actions
              • Do nothing
            • Else - Actions
              • Unit - Add Life Bonus to (Picked unit)
              • Unit Group - Add (Picked unit) to LifeGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)
      • Set UnitGroup = (Units in (Playable map area) matching ((((Matching unit) has buff Life Aura) Equal to False) and (((Matching unit) is in LifeGroup) Equal to True)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Life Bonus from (Picked unit)
          • Unit Group - Remove (Picked unit) from LifeGroup
      • Custom script: call DestroyGroup (udg_UnitGroup)


I just realized you wanted increases of a percentage of health. I don't know of any way to do that, I don't think there are any abilities or functions that do that.
 
Cool, thanks! I'll put it into the editor and test it out in a little bit.

So, I'll just make one of these for each version of the ability, and just change the level 2 and level 3 to add an effective 10%, so they don't stack.

And thanks for the heads up on the percentages....what I'm going to do is just add what should be x% of a unit's life at the level where they get the ability. It'll make things a little strangly balanced, but not brokenly so.

Thanks again!
 
I think that you could have the Life Bonus ability to work with % if you do like this:
Make about 4-5 of that ability and everyone should have 9 levels.
1st one would have 1,2,3... to 9 value,
2nd one would have 10,20,30... to 90 value,
3rd one would have 100,200,300... to 900 value,
and so on. I Haven't tried this method, but think it might work.

If you'd increase health with 1304 it'd be
1st ability on level 4, 2nd not used, 3rd on lvl 3 and 4th on lvl 1

It'd probably be easier to make in Jass though.
 
Not sure how you would go about adding percents but I have made a passive aura in the past based off of Blood Pact from WoW.

I'm sure its a little clunky in that it can probably be made in a much more simple manner than I have but it adds to a units max HP.

The ability has 5 levels, I'll post the first level to give you an example of how I did it. If you're interested, I'll host my map as a whole and you can just extract everything.

Trigger:
  • Learn Blood Pact
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to (==) Summon Scamp
    • Actions
      • Trigger - Turn on Blood Pact Off Rank 1 <gen>
      • Trigger - Turn on Blood Pact Rank 1 <gen>
      • Trigger - Turn off (This trigger)


Trigger:
  • Blood Pact Rank 1
    • Events
      • Time - Every 1.50 seconds of game time
    • Conditions
    • Actions
      • Set MyUnitGroup = (Units in (Entire map) matching (((Matching unit) has buff Blood Pact ) Equal to (==) True))
      • Unit Group - Pick every unit in MyUnitGroup and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to (==) False
            • Then - Actions
              • Set P = (Position of (Picked unit))
              • Unit - Add Blood Pact (+75 HP Rank 1) to (Picked unit)
              • Custom script: call RemoveLocation(udg_P)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_MyUnitGroup)


Trigger:
  • Blood Pact Off Rank 1
    • Events
      • Time - Every 1.50 seconds of game time
    • Conditions
    • Actions
      • Set MyUnitGroup = (Units in (Entire map) matching (((Matching unit) has buff Blood Pact ) Equal to (==) False))
      • Unit Group - Pick every unit in MyUnitGroup and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to (==) False
            • Then - Actions
              • Set P = (Position of (Picked unit))
              • Unit - Remove Blood Pact (+75 HP Rank 1) from (Picked unit)
              • Custom script: call RemoveLocation(udg_P)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_MyUnitGroup)


Basically, it adds all units into a group, etc. If they have the Blood Pact buff it will apply the bonus hit points. Every 1.5 seconds it checks to see that the units have the buff, if they do not it will remove the bonus health.

Mine adds a bonus 75, 105, 135, 165, & 195 hit points.
 
This time around, I'm trying to make an aura that adds to a unit's maximum hp, preferably as a percentage. As usual, I can't find a good analogue in the default abilities. Here's the ability as designed:

Inspiration-
Inspired by the sight of a true champion, the surrounding allied units are able to withstand more damage.

Level 1: Adds +30% to max HP.
Level 2: Adds +40% to max HP.
Level 3: Adds +50% to max HP.

This ability is going to be on 3 different units, each unit will have one of the 3 levels of the aura. They also need to *not stack*. I'd guess that the best way to avoid stacking issues is to make 3 different abilities, one that adds +30%, then two that add +10% that stack, then just give the highest level unit all 3 abilities. But, that's just a guess, I really don't know.

I thought about dealing with this in a trigger, but I couldn't find a way to change a unit's maximum hps as an action, just their current hp.

Any help would be greatly appreciated. Thanks!

You should just make a dummy unit cast a shield equivilant to the %HP you want... when it gets aura. That would be more viable.
 
Well, I've run into a snag trying to get this to work. I've based the ability off of Genkora's code, but with one change. The buff needs to work on buildings, as this is for a Tower Defense variant I'm working on. The problem is, the aura simply isn't showing up!

None of the buildings are accepting the buff. The ability and the buff are based off of Brilliance Aura. The ability has the following targets:

Air, Friend, Ground, Invulnerable, Self, Structure, Vulnerable


Further more, the other aura I'm using, Life Regeneration Aura (the one from the Fountain of Life, only thing changed was adding Structure as a target and the amount healed) isn't showing up either. Are buildings just not affected by auras?

Edit:

I've done some further testing. 1st off, the Life Regen aura had to be scrapped, and rebased off of Healing Ward Aura, which is affecting things properly. It doesn't show up in any Status: fields, but I dunno why. It works though, and is targeting structures.

However, the +HP Aura is borked. It's not even giving creatures the buff, and since the entire thing is based off of the buff, everything's going down the tubes. I'll have to look into it more.
 
Well, I've run into a snag trying to get this to work. I've based the ability off of Genkora's code, but with one change. The buff needs to work on buildings, as this is for a Tower Defense variant I'm working on. The problem is, the aura simply isn't showing up!

None of the buildings are accepting the buff. The ability and the buff are based off of Brilliance Aura. The ability has the following targets:

Air, Friend, Ground, Invulnerable, Self, Structure, Vulnerable


Further more, the other aura I'm using, Life Regeneration Aura (the one from the Fountain of Life, only thing changed was adding Structure as a target and the amount healed) isn't showing up either. Are buildings just not affected by auras?

Edit:

I've done some further testing. 1st off, the Life Regen aura had to be scrapped, and rebased off of Healing Ward Aura, which is affecting things properly. It doesn't show up in any Status: fields, but I dunno why. It works though, and is targeting structures.

However, the +HP Aura is borked. It's not even giving creatures the buff, and since the entire thing is based off of the buff, everything's going down the tubes. I'll have to look into it more.

The system / Triggers I linked work 100% perfect :confused:
 
I didn't check out all the posts... but if it has to be a percentage, then you can use triggers. The amount of hp to add would be this formula (your variable)/100 x Hp.
---
your variable would be 10%xLevelofXXXspell for XXxUnit. (this is a formula for 10% hp on level 1 and 20% on lv two and 30% on lv three and so on.
---
 
Ok listen good to this approach...
U know that upgrade that increases HP, make it researchable for all units.

When a unit enters your aura, store it in an integer variable

integer lol = Max HP of unit getting buff * .1 (for 10 %)

Then you do this

For int A 1 to 10
If(integer lol < 100 * int A )
Research HP UPPER for player of unit getting buff level int [A]
 
Ok listen good to this approach...
U know that upgrade that increases HP, make it researchable for all units.

When a unit enters your aura, store it in an integer variable

integer lol = Max HP of unit getting buff * .1 (for 10 %)

Then you do this

For int A 1 to 10
If(integer lol < 100 * int A )
Research HP UPPER for player of unit getting buff level int [A]

Then what happens when the unit leaves the affects of that aura? You can't undo a research.
 
That doesn't sound like a waterproof method
 
Then have another upgrade that minuses hp.

Ha ha. That would create such a shit storm of data floating around.

Every single time a new unit is affected by the aura you need to research it. then disable it when they leave the affects of the aura.

By this time you now have two different researches for the same person. Each and every time they enter and leave 2 more, it would be an exponential growth in Triggers and researches for each and every unit in your map. 2,4,8,etc.

Not even possible, nor worth doing.

Like I said, give my method a shot man, it works 100% flawlessly and with no researching. Just use the bonus HP item ability.
 
Ha ha. That would create such a shit storm of data floating around.

Every single time a new unit is affected by the aura you need to research it. then disable it when they leave the affects of the aura.

By this time you now have two different researches for the same person. Each and every time they enter and leave 2 more, it would be an exponential growth in Triggers and researches for each and every unit in your map. 2,4,8,etc.

Not even possible, nor worth doing.

Like I said, give my method a shot man, it works 100% flawlessly and with no researching. Just use the bonus HP item ability.
You would use integer strings. For example.
int count = 1

if(Unit enters, HP is <= 100,)
{
Research HP(count);
Leaves, Research HPreduction(count);
}

Most effective method is my method. No excess in data flow. The unit enters aura (which is not nearly as buggy as unit within range) Do such and such. Leaves remove such and such. Say on an average occasion you have 7 units around you, thats not going to even scratch lag....
 
Sorry to necro post, I know it's been awhile on this.

I got the bloody thing working. It was stupid simple too.

Brilliance Aura, which I had originally based the ability off of flat out *does not* work on structures, no matter what you set the flags to.

However, I was playing around with another aura that gave nearby structures a hit point regeneration, and based that off of Devotion Aura. Boom, structure takes it, all's well.

Rebased the +HP Max aura on Devo, works just fine. It's acting slightly strange in that the unit giving the aura itself is not getting the +HP, but I'm not entirely concerned. If I can get it to work, cool. If not, it's a more important unit to protect and will give the player another interesting choice in his combat strategy.

I'll probably leave it broken, haha.

Thanks for all the help with this.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/
  • The Helper The Helper:
    Happy Thursday!
  • Ghan Ghan:
    I'm not so sure, there's still a lot of Thursday left for it to become unhappy.
    +3
  • The Helper The Helper:
    still a few hours
  • The Helper The Helper:
    Its Friday!!!!
    +1
  • Ghan Ghan:
    Thursday 7/10 would Thursday again
    +3

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top