- Joined
- Feb 15, 2013
- Messages
- 369
How to make a Magic Shield that absorbs x amount of damage or untill x seconds? Do it needs triggers?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Yes it does, but only if the attacking unit has magic attack type.I think the banshee's anti-magic shell does that exact same thing.
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.There's supposed to be an option in Gameplay constants to make it absorb damage, don't know if it actually works though.
Mana shield ?
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
I hope you guys realize mana shield and berserk are only affect casting unit itself.
400 post, time to leave.
Besides, there's no other way to catch damage and stop it any other way, just those two abilities. Believe me,
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)
Block Damage

Events


Unit - takes damage event here

Conditions

Actions


Unit - Set life of (Triggering unit) to ((Life of (Triggering Unit)) + (Damage Taken))
