this is a passive spell like evasion
attack_unit is a variable. Beer is a dummy unit with druken haze ability. i dont know what happen. i did everything exactly as the sample map. but the sample map works fine, mine doesnt work at all.
and Set Chance = (Random integer number between 1 and 75, is this mean the chance is 75% or 25%?
Code:
Passive Drunken Haze
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to attacked_unit
Actions
Set Percent = 1
If ((Level of Drunken Haze for (Attacking unit)) Equal to 1) then do (Set Chance = (Random integer number between 1 and 75)) else do (Do nothing)
If ((Level of Drunken Haze for (Attacking unit)) Equal to 2) then do (Set Chance = (Random integer number between 1 and 65)) else do (Do nothing)
If ((Level of Drunken Haze for (Attacking unit)) Equal to 3) then do (Set Chance = (Random integer number between 1 and 55)) else do (Do nothing)
If ((Level of Drunken Haze for (Attacking unit)) Equal to 4) then do (Set Chance = (Random integer number between 1 and 45)) else do (Do nothing)
If ((Level of Drunken Haze for (Attacking unit)) Equal to 5) then do (Set Chance = (Random integer number between 1 and 35)) else do (Do nothing)
If ((Level of Drunken Haze for (Attacking unit)) Equal to 6) then do (Set Chance = (Random integer number between 1 and 25)) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Chance Equal to Percent
Then - Actions
Unit - Create 1 Beer for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing 90.00 degrees
Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Attacked unit)
Wait 0.50 seconds
Unit - Remove (Last created unit) from the game
Else - Actions
Do nothing
attack_unit is a variable. Beer is a dummy unit with druken haze ability. i dont know what happen. i did everything exactly as the sample map. but the sample map works fine, mine doesnt work at all.
and Set Chance = (Random integer number between 1 and 75, is this mean the chance is 75% or 25%?