Make a unit unable to take damage. Help

merlinds

Member
Reaction score
15
Hi everybody,
Im trying to creat a skill that makes the hero to not take any damage during a period, not invulnerable only make the unit to not take damage. The skill will be some thing like "Pain Killer" you activate it and consumes mana whiles make you un-damagable. Then if you get out of mana or turn it off you return to normal with the same life that you have before.
I have the idea to use the "Damage Taken" option and after the damage is taken heal the unit for the same amount. But the problem is that if the damage taken is grater than the remaining llife of the uni it will kill it.
Please help me! :p
Thx you all!
Sry for my english!
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
create an ability based off stoneskin (blocks physical damage) with a value of say, 10,000,000 and another ability based on magic damage reduction, with 100%, add both abilities to a spell book, and when the ability is activated, add the spellbook and disable it, both abilities will be hidden and you can remove the spellbook when they deactivate the ability

or try this...

Trigger:
  • Damage Reduction - Detect Units
    • Events
      • Unit - A unit learns an ability
    • Conditions
      • Ability Learned is equal to (defensive stance [thats the base ability])
    • Actions
      • If then else
        • If
          • Boolean - ((Key Triggering unit) of 1 (NOT THE SAME number as the rest of the triggers) in Damage_Reduction_Hashtable) is not equal to false
        • Then
          • Hashtable - Save false as (key triggering unit) of 1 (same number as the one just above but NOT the rest of the triggers) in Damage_Reduction_hashtable
          • Trigger - Add Event (triggering unit takes damage) to Damage Reduction - Takes Damage <gen>
        • Else
      • Set Temp_Group = Units in (Ability)_Group
      • Unit Group - Add triggering unit to Temp_Group
      • Set (Ability)_Group = Units in Temp_Group
      • Custom Script: Calldestroyunitgroup(UDG_Temp_Group)


Trigger:
  • Damage Reduction - Activation
    • Events
      • Unit - A unit activates (defensive stance)
    • Conditions
    • Actions
      • Hashtable - Save true as (key triggering unit) of 0 (same as the other triggers but not the first) in Damage_Reduction_Hashtable
      • Trigger - Turn on Damage Reduction - Mana Cost <gen>
      • Trigger - Turn on Damage Reduction - Takes Damage <gen>


Trigger:
  • Damage Reduction - Deactivation
    • Events
      • Unit - A unit deactivates (defensive stance)
    • Conditions
    • Actions
      • Hashtable - Save false as (key triggering unit) of 1 (same as other triggers but not the first one) in Damage_Reduction_Hashtable
      • If then else
        • If
          • Integer - Number of units in (Ability)_Group matching conditions (Hashtable - (key matching unit) of 1 (same as other triggers but not the first one) in Damage_Reduction_Hashtable and matching unit is alive is equal to true) is equal to 0
        • Then
          • Trigger - Turn off Damage Reduction - Mana Cost <gen>
          • Trigger - Turn off Damage Reduction - Takes Damage <gen>
        • Else


Trigger:
  • Damage Reduction - Mana Cost
    • Events
      • Periodic event - Every 0.2 seconds (or however smooth you want the mana degen to be, faster refresh rate)
    • Conditions
    • Actions
      • Set Temp_Group = Units in (Ability)_Group matching conditions ([(key Matching unit) of 1 (or any other random number) in Damage_Reduction_Hash] equal to true)
      • Unit Group - Pick all units in Temp_Group and do actions
        • Loop Actions
          • If then else
            • If
              • Or (any conditions are true)
                • Unit - Mana of picked unit less than or equal to 2.00 x (Mana cost per second x refresh rate [number from event])
                • Boolean - Unit is alive is equal to false
              • Then
                • Unit - Set mana equal to mana of picked unit - (Mana cost per second x refresh rate [number from event])
                • Ability - Deactivate (defensive stance)
                • Hashtable - Save boolean as false in (key Picked unit) of 0 (or whatever number you used in the condition for matching units) in Damage_Reduction_Hashtable
                • If then else
                  • If
                    • Number of units in Temp_Group = 1
                  • Then
                    • Trigger - Turn off this trigger
                    • Trigger - Turn off Damage Reduction - Takes Damage <gen>
                  • Else
              • Else
                • Unit - Set mana equal to mana of picked unit - (Mana cost per second x refresh rate [number from event])
      • Custom Script: Calldestroyunitgroup(UDG_Temp_Group)


Trigger:
  • Damage Reduction - Takes Damage
    • Events
    • Conditions
      • Boolean - (Key Damaged Unit) of 0 (or w/e number you used in the previous trigger) in Damage_Reduction_Hashtable is equal to True
    • Actions
      • Unit - Set life of triggering unit = life of triggering unit + damage taken
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I've never tried it, but perhaps Berserk with -100% damage taken increase?

EDIT: Tried it. It appears to work, reducing both spell and attack damage to 0.
EDIT2: If you enter a value of lower than -1.00 into the field, you are actually healed by the extra percentage.
 

vypur85

Hibernate
Reaction score
803
> Berserk
This will definitely work well in this case. But bear in mind that the negative value does not affect the amount of damage taken. Meaning even at a value of -1%, the unit will still get 100% damage free.

On a related note, to use negative values, you will need to hold the SHIFT key and double click the field you want to change. Then add in a negative number.


> If you enter a value of lower than -1.00 into the field, you are actually healed by the extra percentage.
This is new to me. Never actually tested that.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
After all that i just realized it would be SUPER easy to do with mana shield... just activate it, trigger the mana loss and set it to cost 0 mana per point of damage
 

ultimate11

Active Member
Reaction score
25
@GFreak45 is perfectly wright ,i sugest you to use his way is beter then using bersek or use a damage detect system like Weep system :D.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You probably won't use my method unless you trigger it, but I realised something else.

DotA's Lord of Avernus' Borrowed Time appears to use Berserk. Now we know how to answer all those newbies and people looking for it.
 

merlinds

Member
Reaction score
15
I already make it with berserk, it works perfect. I would stay with it for now since im tryin to reach a "Stable" version of my map. Thx you all!!!!!!
 

Jedi

New Member
Reaction score
63
You probably won't use my method unless you trigger it, but I realised something else.

DotA's Lord of Avernus' Borrowed Time appears to use Berserk. Now we know how to answer all those newbies and people looking for it.

No it doesn't.There is not a buff and it would cause problems with mask of madness.
 

Smitty

Member
Reaction score
20
It probably uses damage detection and a trigger to set the life of the damaged unit to life+(2*damage).
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Apparently Borrowed Time doesn't interrupt orders, and I only know of Wind Walk and Berserk that do that... Wait. There's no green border around the icon. So... it's a toggle skill? Makes sense, combined with the buff.

Never mind, I'm rambling. Does Berserk work fine? :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top