Naminator
Coming Back To Life
- Reaction score
- 76
Here's another DotA Spell made by me. Paralyzing Cask from Witch Doctor. How to implement this in your map inside.
JASS/GUI: GUI
Lagless: Yes
Leakless: Yes (I think)
MUI: Don't think so
Paralyzing Cask:
Vol'jin launches a cask of paralyzing powder that bounces between foes, stunning those affected for a short period of time (1 sec on Hero, 5 on creeps). Deals damage per bounce to non-hero units.
Code:
JASS/GUI: GUI
Lagless: Yes
Leakless: Yes (I think)
MUI: Don't think so
Paralyzing Cask:
Vol'jin launches a cask of paralyzing powder that bounces between foes, stunning those affected for a short period of time (1 sec on Hero, 5 on creeps). Deals damage per bounce to non-hero units.
Code:
Code:
Paralyzing Cask
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Paralyzing Cask
Actions
Countdown Timer - Pause PC_StartTimer
Unit - Remove PC_Dummy from the game
Set PC_Caster = (Triggering unit)
Set PC_Caster_Loc = (Position of PC_Caster)
Set PC_Target = (Target unit of ability being cast)
Set PC_Target_Loc = (Position of PC_Target)
Set PC_Jumps = (2 x (Level of Paralyzing Cask for PC_Caster))
Set PC_Movement = 13.00
Set PC_Detect = 50.00
Set PC_Timer = 0.03
Set PC_AoE = 500.00
Unit - Create 1 Dummy Effect for (Owner of PC_Caster) at PC_Caster_Loc facing PC_Target_Loc
Set PC_Dummy = (Last created unit)
Countdown Timer - Start PC_StartTimer as a Repeating timer that will expire in PC_Timer seconds
Custom script: call RemoveLocation(udg_PC_Caster_Loc)
Custom script: call RemoveLocation(udg_PC_Target_Loc)
Code:
Paralyzing Cask Action
Events
Time - PC_StartTimer expires
Conditions
Actions
Set PC_Dummy_Loc = (Position of PC_Dummy)
Set PC_Target_Loc = (Position of PC_Target)
Set PC_Offset = (PC_Dummy_Loc offset by PC_Movement towards (Angle from PC_Dummy_Loc to PC_Target_Loc) degrees)
Set PC_Distance = (Distance between PC_Dummy_Loc and PC_Target_Loc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PC_Distance Greater than PC_Detect
Then - Actions
Unit - Move PC_Dummy instantly to PC_Offset, facing (Angle from PC_Dummy_Loc to PC_Target_Loc) degrees
Else - Actions
Unit - Move PC_Dummy instantly to PC_Target_Loc
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(PC_Target is A Hero) Equal to True
Then - Actions
Unit - Remove Paralyzing Cask (Pause) buff from PC_Target
Unit - Create 1 Dummy Unit for (Owner of PC_Caster) at PC_Target_Loc facing Default building facing degrees
Unit - Add Stun for Heroes to (Last created unit)
Unit - Order (Last created unit) to Neutral - Firebolt PC_Target
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Else - Actions
Unit - Remove Paralyzing Cask (Pause) buff from PC_Target
Unit - Create 1 Dummy Unit for (Owner of PC_Caster) at PC_Target_Loc facing Default building facing degrees
Unit - Add Stun for Creeps to (Last created unit)
Unit - Set level of Stun for Creeps for (Last created unit) to (Level of Stun for Creeps for PC_Caster)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt PC_Target
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Set PC_Jumps = (PC_Jumps - 1)
Set PC_Group = (Units within PC_AoE of PC_Dummy_Loc matching ((((Matching unit) belongs to an enemy of (Owner of PC_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in PC_Group) Greater than 0
PC_Jumps Greater than 0
Then - Actions
Set PC_Target = (Random unit from PC_Group)
Else - Actions
Countdown Timer - Pause PC_StartTimer
Unit - Remove PC_Dummy from the game
Custom script: call DestroyGroup (udg_PC_Group)
Custom script: call RemoveLocation (udg_PC_Dummy_Loc)
Custom script: call RemoveLocation (udg_PC_Target_Loc)
Custom script: call RemoveLocation (udg_PC_Offset)
Attachments
-
15.1 KB Views: 909
Last edited by a moderator: