Shield Wall (Ability to reduce DMG taken by 60%)

duyen

New Member
Reaction score
214
Mana shield is taken off when you're out of mana, so it's not really much of an option.
 

Leazy

You can change this now in User CP.
Reaction score
50
Oh, then I can't go with it =/

Is there some good way in jass to reduce DMG taken by 60%?
 

Kenny

Back for now.
Reaction score
202
In JASS, you can use the UNIT_IS_DAMAGED event, or whatever it is, then check for a buff (the buff will be from a self targeting roar ability) and if the unit has the buff then heal the unit for 60% of the damage taken or whatever you wanted. I havent got WE, so some one else may be able to do it, but it is certainly possible, and quite easy. If i do do it, it will be in vJASS.

EDIT:

Don't have the time to make one exactly as you specified, however, this works similarly. Its like backtrack from DotA, if you know what that is. Instead of lasting 12 seconds it last indefinately, however it only has a % chance to go off.

Some on may be able to come along and change it for you.

JASS:
scope ShieldWall initializer Init

globals
    private constant integer Abil_id = '----' // Raw code of the passive ability.
    private constant string Sfx = "Your\\effect\\here." // May want an effect to Play
    private constant string Point = "chest" // Probably the best place for an attachment point.
endglobals

private function Percent takes integer lvl returns real
    return 0.20*lvl    // Percentage of damaged healed. So 100 damage dealt would only be 80/60/40.
endfunction

private function Chance takes integer lvl returns integer
    return 10+(5*lvl) // Percent chance to absorb damage.
endfunction

private function Heal takes nothing returns boolean
    local unit cast = GetTriggerUnit()
    local real dam = GetEventDamage()
    local integer lvl = GetUnitAbilityLevel(cast,Abil_id)
   
    if (dam > 1) then
	if (GetRandomInt(1,100) <= Chance(lvl)) then
            call SetWidgetLife(cast,GetWidgetLife(cast)+(dam*Percent(lvl)))
	    call DestroyEffect(AddSpecialEffectTarget(Sfx,cast,Point))
        endif
    endif
    
    set cast = null
    
    return false
endfunction

private function Actions takes nothing returns nothing
    local unit cast = GetTriggerUnit()
    local trigger trig
    
    if GetUnitAbilityLevel(cast,Abil_id) == 1 then
	set trig = CreateTrigger()
	call TriggerRegisterUnitEvent(trig,cast,EVENT_UNIT_DAMAGED)
	call TriggerAddCondition(trig,Condition(function Heal))
    endif
    
    set cast = null
endfunction

private function Conditions takes nothing returns boolean
    return GetLearnedSkill() == Abil_id and IsUnitIllusion(GetTriggerUnit()) == false
endfunction

private function Init takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trig,EVENT_PLAYER_HERO_SKILL)
    call TriggerAddCondition(trig,Condition(function Conditions))
    call TriggerAddAction(trig,function Actions)
endfunction

endscope


Basically put in the raw code for the passive skill where '----' is, and add a special effect if you want. Then change around Percent and Chance as you like.

Its not much but its a start :). It was done in note pad, but i still think it should work fine.
 

Leazy

You can change this now in User CP.
Reaction score
50
Nice kenny, thanks! :)

However, could you do it likes this:
E: A unit takes DMG
C: The unit taking DMG has shield wall buff (rawcode = B00L)
A: some way to reduce DMG taken by 60%, before the DMG is dealt if possible.

Only 1 lvl, should always work if the unit has the buff (B00L).
No effect attached needed.

Thats all the trigger need =)
 

Igor_Z

You can change this now in User CP.
Reaction score
61
I think the unit takes damage means it will reduce damage from everything like spells, magic attack, piercing, hero etc.. Is that what u want? Read how Zombie's ulti spell is made in dotA
 

Leazy

You can change this now in User CP.
Reaction score
50
That spell gives extra DMG, thats much more easy to do than lowering the DMG taken before it is taken. Thanks anyway though :)
 

Slapshot136

Divide et impera
Reaction score
471
Mana shield doesn't seam to work. If I change these fields:

Damage Absorbed (%) to 0.60
Mana Per Hit Point to 0.00

The mana shield buff disappears after one hit. =/

sry if this is a little late.. but.. isnt that supposed to be a really big number instead of 0?
 

Leazy

You can change this now in User CP.
Reaction score
50
Yeah, maybe. However the shield is still removed when 0 mana is reached, and the unit is a warrior (like the warriors in WoW), so it has 100 rage, it will get 0 mana very often.
 

eXirrah

New Member
Reaction score
51
That's the best I could do with mana shield:

Trigger:
  • Shiled activate
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(thunderclap))
    • Actions
      • Game - Display to (All players) the text: on
      • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Activate Mana Shield
      • Set bool = True
      • Wait 12.00 seconds
      • Set bool = False
      • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Deactivate Mana Shield


Trigger:
  • Shield turned off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • bool Equal to True
          • (Issued order) Equal to (Order(manashieldoff))
    • Actions
      • Wait 0.00 seconds
      • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Activate Mana Shield


but as you can see the mana shield is deactivatable so it can be a bit annoing someone playing with it, but you can put the mana shield in some spell book that the unit has no access to but just to store the mana shield so you can't deactivate it, it could work. Try it out ...

EDIT:
It is always nice when you reduce damage via triggers except for the case when the unit has 100 hp and is hit by 100 dmg which must be reduced to 40 so the unit dies and you cannot add hp ....

EDIT2 :

I checked all the abilities for some that you might use and noticed that Spiked Carapace has Received Damage Factor which is set to 1.00 by default. You should try to set it to 0.4 and try if you receive 60% less dmg. I think that will work.
 

perkeyone

something clever
Reaction score
71
maybe try
when a unit is targeted
add a large chunk of hp
then after the damage add a percentage of the damage taken back to the unit
then remove the large chunk of hp
 

Leazy

You can change this now in User CP.
Reaction score
50
I think I go with this: When a unit casts the ability, it will get a dummy ability based on spiked carapse, and after the duration is over I will remove the dummy ability. Thanks for tipping me about spiked carapse :)
 
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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top