HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Damage-Absorbing Shield

01-19-2006, 03:37 AM#1
Beeva186
The ability I want to make is kinda like the one in DOTA called Aphotic Shield (Only without the AoE damage at the end). Basically, it's just a shield that absorbs a certain amount of damage before breaking. What I want to know is, what ability is this based off? Or do you have to do the whole thing by triggers?
Thanks in advance
01-19-2006, 03:58 AM#2
Earth-Fury
probobly mana shield. then you would detect damage delt, and when it reaches a certant point, you would de-activate mana shield. you could also use evasion.
01-19-2006, 03:33 PM#3
Vexorian
I would use the A unit is damaged event and damage blocking
01-19-2006, 04:05 PM#4
Peekaboo
Anti-Magic Shell springs to mind, don't know if you can change the damage type it blocks though
01-19-2006, 04:13 PM#5
Jacek
Download Daelin's Defensive Matrix from www.wc3sear.ch this is what you need

EDIT: little offtopic question... how does AMS work when set to absorb 10 damage and is hit with 50 dmg storm bolt. Will unit be stunned and will it take 0 damage or 40 or 50?
01-19-2006, 06:17 PM#6
qwertyui
You always get the buffs/debuffs even when under AMS protection i think. So stun will always happen.
The damage will go 10 absorbed, 40 dealt.
01-19-2006, 07:23 PM#7
johnfn
Trigger:
Collapse Casted Shield
Collapse Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Shield
Collapse Actions
Trigger - Add to Shield <gen> the event ((Casting unit) Takes Damage)
Set ManaShieldLife = 500

Collapse Shield
Events
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
ManaShieldLife Greater Than 0
Collapse Then - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Attacked unit) is dead) Equal to True
Collapse Then - Actions
Unit - Create 1 (Unit-type of (Attacked unit)) for (Owner of (Attacked unit)) at (Position of (Attacked unit)) facing Default building facing degrees
Unit - Set life of (Attacked unit) to (Damage taken)
Set ManaShieldLife = (ManaShieldLife - (Damage Taken))
Collapse Else - Actions
Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (Damage taken))
Set ManaShieldLife = (ManaShieldLife - (Damage Taken))
Else - Actions
Special Effects? ^^

It doesn't work for multiple units casting the spell. But if you need me to, I'll be glad to make it work
01-19-2006, 09:52 PM#8
Anitarf
It shouldn't work at all as it is. First of all, you use "attacked unit" on unit takes damage event, when you should use triggering unit. Second, the trigger would work for all units the spell was ever cast on, because you don't/can't remove events, and you don't check which unit is currently under the effect of the spell. Third, when reviving the unit, you set it's life wrong, I won't get into how it should be because the event fires before damage is really dealt anyway, so the unit can't be dead from it yet. Fourth, you use "begins casting an ability" when it is more correct to use "starts the effect of an ability" in the first trigger.
01-19-2006, 11:40 PM#9
Beeva186
Right I've almost got the ability right, in that it absorbs damage completely, but I now have no idea how to remove the shield from the unit once it's broken. I thought I could use a dispel but that'd also dispel everything from the unit... Any thoughts?
01-20-2006, 12:26 AM#10
Immoralis
Theres a trigger
Trigger:
Unit - Remove Mana Shield buff from (Triggering unit)
01-20-2006, 01:35 AM#11
Beeva186
Removing the mana shield buff wouldn't remove the effect of the spell, only the art and tooltip. I need to make it so that the effect of the spell is completely removed, like when the anti-magic shell breaks from too much spell damage.
01-20-2006, 03:16 AM#12
Immoralis
test it first, im 50% sure it may work, or do this..
Trigger:
Actions
Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Deactivate Mana Shield
Unit - Remove Mana Shield from (Triggering unit)
01-20-2006, 06:11 AM#13
Beeva186
Oh crap sorry Immoralis, you were completely right... I forgot that all I needed to do was take the buff away from the target unit for it to work! I prostrate myself before your greatness *bow*!
01-21-2006, 12:21 AM#14
Volte
Um... Why do people keep referring to this non existent "A unit is damaged" event. I really need something like this but there is no such thing. I need a way to prevent a unit from attacking under certain conditions.
01-21-2006, 12:23 AM#15
Vexorian
Of course that event exists, I use it all the time