EvasionInit
Events
Map initialization
Conditions
Actions
Set EvasionPercent[1] = 25
Set EvasionPercent[2] = 50
Set EvasionPercent[3] = 75
Evasion
Events
Unit - A unit Is attacked
Conditions
(Level of Evasion for (Attacked unit)) Greater than 0
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to EvasionPercent[(Level of Evasion for (Attacked unit))]
Then - Actions
Hero - Modify unspent skill points of (Attacked unit): Add (Level of Evasion for (Attacked unit)) points
Hero - Learn skill for (Attacked unit): EvasionReal
Unit - Set level of EvasionReal for (Attacked unit) to (Level of Evasion for (Attacked unit))
Wait 0.25 seconds
For each (Integer A) from 1 to (Level of EvasionReal for (Attacked unit)), do (Actions)
Loop - Actions
Unit - Decrease level of EvasionReal for (Attacked unit)
Set TempPoint = (Position of (Attacked unit))
Unit - Create 1 Priest for (Owner of (Attacked unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_TempPoint)
Unit - Add Abolish Magic to (Last created unit)
Unit - Set level of Abolish Magic for (Last created unit) to (Level of Evasion for (Attacked unit))
Unit - Order (Last created unit) to Night Elf Dryad - Abolish Magic (Buying unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Else - Actions