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

Magic Shield

Status
Not open for further replies.
Level 21
Joined
May 29, 2013
Messages
1,566
I think the banshee's anti-magic shell does that exact same thing.
Yes it does, but only if the attacking unit has magic attack type.
There's supposed to be an option in Gameplay constants to make it absorb damage, don't know if it actually works though.
There are two abilities named Anti-Magic Shell. One of them stops x points of spell damage (by default 300) from affecting a target unit. Other one is just a temporary magic and spell immunity.
 
Level 12
Joined
May 20, 2009
Messages
822
Mana shield ?

Mana Shield Absorbs % damage for it's duration, it has no limit to the actual amount of damage it can absorb. It also REQUIRES that Mana Per Damage is set to at least 1, otherwise it turns off after each time the unit is attacked.

A MUCH BETTER alternative is using Berserk, because you can set "Damage Taken Increase %" to a negative number and it'll REDUCE damage instead.

You'll need a Damage Detection System, I prefer GDD because it's just extremely easy to use and is EXTREMELY fast.

You'll do this:

  • Defensive Matrix Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Berserk
          • (Unit-type of (Triggering unit)) Equal to YourUnit
        • Then - Actions
          • Set MatrixMaxIndex = (MatrixMaxIndex + 1)
          • Set MatrixCaster[MatrixMaxIndex] = (Triggering unit)
          • Trigger - Turn on Defensive Matrix Calc <gen>
        • Else - Actions
  • Defensive Matrix Calc
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • For each (Integer MatrixInit) from 1 to MatrixMaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GDD_DamagedUnit Equal to MatrixCaster[MatrixInit]
            • Then - Actions
              • Set MatrixDamage[MatrixInit] = (MatrixDamage[MatrixInit] + GDD_Damage)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MatrixDamage[MatrixInit] Greater than or equal to 200.00
            • Then - Actions
              • Unit - Remove Berserk buff from MatrixCaster[MatrixInit]
            • Else - Actions
Removing the Berserk Buff basically just turns the spell off without having to tell the unit to use the ability, which then results in the Cooldown being untouched.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
I hope you guys realize mana shield and berserk are only affect casting unit itself.

400 post, time to leave.
 
Level 12
Joined
May 20, 2009
Messages
822
I hope you guys realize mana shield and berserk are only affect casting unit itself.

400 post, time to leave.

Well, he didn't specify if he wanted it to affect the casting unit or a targeted unit...

Besides, there's no other way to catch damage and stop it any other way, just those two abilities. Believe me, I've tried looking for more but those are the only ones!!

(There might be a JASS code or something, but that's besides the point.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Besides, there's no other way to catch damage and stop it any other way, just those two abilities. Believe me,

No you don't need any object editor things to stop damage.Just use a trigger like this.

  • Block Damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) + GDD_Damage)
or this

  • Block Damage
    • Events
      • Unit - takes damage event here
    • Conditions
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering Unit)) + (Damage Taken))

This is simplest version, it won't work on units with full hp(because this is simplest version) so don't just hit unit 1 times and say it doesnt work.There is a way to make it work with full hp units but that is another story.
 

EdgeOfChaos

E

EdgeOfChaos

Here's one without damage detection that works at high HP. Unfortunately, it will not resist 1 hit kills. Is this like what you wanted? This one also takes armor into account and spell resist.

(Note: Requires Unit Indexer (In the map))
 

Attachments

  • Shielding.w3x
    24 KB · Views: 78
Level 12
Joined
Nov 3, 2013
Messages
989
I don't get why people seem to be against using a DDS, if it's going to be triggered might as well make it DDS from the start.

AFAIK he's already made 3 different posts where the easiest way would be to use DDS and probably more to come.
 
Status
Not open for further replies.
Top